mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-12 11:01:45 +00:00
win.once() instead of win.on
This commit is contained in:
@ -43,7 +43,7 @@ module.exports.fileExists = (path, callbackIfExists) => {
|
||||
};
|
||||
|
||||
module.exports.injectCSS = (webContents, filepath, cb = undefined) => {
|
||||
webContents.on("did-finish-load", async () => {
|
||||
webContents.once("did-finish-load", async () => {
|
||||
await webContents.insertCSS(fs.readFileSync(filepath, "utf8"));
|
||||
if (cb) {
|
||||
cb();
|
||||
|
||||
Reference in New Issue
Block a user