generated from LiteLoaderQQNT/Plugin-Template
-
Notifications
You must be signed in to change notification settings - Fork 15
/
renderer.js
25 lines (22 loc) · 943 Bytes
/
renderer.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { cssHelper, removeAllStyles } from "./modules/renderer/css.js";
transitio.onUpdateStyle((event, args) => {
cssHelper(args.path, args.css, args.enabled, args.meta);
});
transitio.onResetStyle(removeAllStyles);
transitio.rendererReady();
/**
* Called when the settings window is created.
* @param {HTMLElement} view The settings view element.
*/
async function onSettingWindowCreated(view) {
const { initTransitioSettings, transitioSettingsUpdateStyle, transitioSettingsResetStyle } = await import("./modules/renderer/settings.js");
const container = await initTransitioSettings(view);
transitio.onUpdateStyle((event, args) => {
transitioSettingsUpdateStyle(container, args);
});
transitio.onResetStyle(() => {
transitioSettingsResetStyle(container);
});
transitio.rendererReady(); // Call again to ensure the settings view gets the styles data.
}
export { onSettingWindowCreated };