/
core.script.js
55 lines (47 loc) · 1.33 KB
/
core.script.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
window.addEventListener("load", function () {
loader.remove();
});
if (localStorage.getItem("theme")) {
app.themes.useWithType(localStorage.getItem("theme"));
}
if (appvar.urlParams.get("data")) {
button.loadJSON(JSON.parse(atob(appvar.urlParams.get("data"))));
}
if (appvar.urlParams.get("theme")) {
app.themes.use(appvar.urlParams.get("theme"));
}
if (appvar.urlParams.get("window")) {
const window = appvar.urlParams.get("window");
app.plugins.load(window, () => {
app.loadWindow(window);
}, false);
}
if (appvar.urlParams.get("panel")) {
const panel = appvar.urlParams.get("panel");
app.plugins.load(
panel,
() => {
app.loadPanel(panel);
},
false
);
app.plugins.load("static", null, false);
} else {
app.plugins.load(
"static",
() => {
app.loadPanel("static");
},
false
);
}
if (localStorage.getItem("template")) {
button.loadJSON(JSON.parse(localStorage.getItem("template")));
localStorage.removeItem("template");
}
if (localStorage.getItem("plugins")) {
JSON.parse(localStorage.getItem("plugins")).forEach((plugin) => {
app.plugins.load(plugin);
});
}
appvar.styleMain.innerText = button.getStaticCode() + button.getHoverCode() + button.getFocusCode();