Added New Themes and intergrated Userbadges
Signed-off-by: AvaLilac <amyshimplays@gmail.com>
This commit is contained in:
parent
5696875641
commit
cbd5f599d9
1 changed files with 9 additions and 0 deletions
|
|
@ -34,12 +34,17 @@ const onNotifyUser = (_info: IUpdateInfo) => {
|
||||||
|
|
||||||
const loadInject = () => {
|
const loadInject = () => {
|
||||||
if (!mainWindow) return;
|
if (!mainWindow) return;
|
||||||
|
|
||||||
mainWindow.webContents.on("dom-ready", async () => {
|
mainWindow.webContents.on("dom-ready", async () => {
|
||||||
try {
|
try {
|
||||||
const injectPath = path.join(__dirname, "inject.js");
|
const injectPath = path.join(__dirname, "inject.js");
|
||||||
const injectCode = fs.readFileSync(injectPath, "utf8");
|
const injectCode = fs.readFileSync(injectPath, "utf8");
|
||||||
await mainWindow.webContents.executeJavaScript(injectCode, true);
|
await mainWindow.webContents.executeJavaScript(injectCode, true);
|
||||||
|
|
||||||
|
const themesPath = path.join(__dirname, "themes.js");
|
||||||
|
const themesCode = fs.readFileSync(themesPath, "utf8");
|
||||||
|
await mainWindow.webContents.executeJavaScript(themesCode, true);
|
||||||
|
|
||||||
const favPath = path.join(__dirname, "aviafavsystem.js");
|
const favPath = path.join(__dirname, "aviafavsystem.js");
|
||||||
const favCode = fs.readFileSync(favPath, "utf8");
|
const favCode = fs.readFileSync(favPath, "utf8");
|
||||||
await mainWindow.webContents.executeJavaScript(favCode, true);
|
await mainWindow.webContents.executeJavaScript(favCode, true);
|
||||||
|
|
@ -47,6 +52,10 @@ const loadInject = () => {
|
||||||
const pluginPath = path.join(__dirname, "pluginsupport.js");
|
const pluginPath = path.join(__dirname, "pluginsupport.js");
|
||||||
const pluginCode = fs.readFileSync(pluginPath, "utf8");
|
const pluginCode = fs.readFileSync(pluginPath, "utf8");
|
||||||
await mainWindow.webContents.executeJavaScript(pluginCode, true);
|
await mainWindow.webContents.executeJavaScript(pluginCode, true);
|
||||||
|
|
||||||
|
const badgePath = path.join(__dirname, "userbadges.js");
|
||||||
|
const badgeCode = fs.readFileSync(badgePath, "utf8");
|
||||||
|
await mainWindow.webContents.executeJavaScript(badgeCode, true);
|
||||||
} catch {}
|
} catch {}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue