Update main.ts
Signed-off-by: AvaLilac <amyshimplays@gmail.com>
This commit is contained in:
parent
4f4f475ee7
commit
db426339ea
1 changed files with 2 additions and 5 deletions
|
|
@ -37,11 +37,8 @@ const loadInject = () => {
|
||||||
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 code = fs.readFileSync(injectPath, "utf8");
|
||||||
await mainWindow.webContents.executeJavaScript(injectCode, true);
|
await mainWindow.webContents.executeJavaScript(code, true);
|
||||||
const favPath = path.join(__dirname, "aviafavsystem.js");
|
|
||||||
const favCode = fs.readFileSync(favPath, "utf8");
|
|
||||||
await mainWindow.webContents.executeJavaScript(favCode, true);
|
|
||||||
} catch {}
|
} catch {}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue