mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-02-24 07:25:10 +00:00
Styles: Inline findDocuments as it won't be used anywhere else
This commit is contained in:
parent
73e5110f6c
commit
799ae1593b
1 changed files with 2 additions and 6 deletions
|
@ -33,11 +33,6 @@ export function requireStyle(name: string) {
|
||||||
return style;
|
return style;
|
||||||
}
|
}
|
||||||
|
|
||||||
function findDocuments() {
|
|
||||||
const popouts = PopoutWindowStore?.getWindowKeys()?.map(k => PopoutWindowStore?.getWindow(k)?.document) ?? [];
|
|
||||||
return [document, ...popouts];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A style object can be obtained by importing a stylesheet with `?managed` at the end of the import
|
* A style object can be obtained by importing a stylesheet with `?managed` at the end of the import
|
||||||
* @param style The style object or name
|
* @param style The style object or name
|
||||||
|
@ -188,7 +183,8 @@ export function updateStyleInDocument(style: Style, doc: Document) {
|
||||||
* @see {@link setStyleVariables} for more info on style classnames
|
* @see {@link setStyleVariables} for more info on style classnames
|
||||||
*/
|
*/
|
||||||
export function compileStyle(style: Style) {
|
export function compileStyle(style: Style) {
|
||||||
findDocuments().forEach(doc => updateStyleInDocument(style, doc));
|
const popouts = PopoutWindowStore?.getWindowKeys()?.map(k => PopoutWindowStore?.getWindow(k)?.document) ?? [];
|
||||||
|
return [document, ...popouts].forEach(doc => updateStyleInDocument(style, doc));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue