mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-14 11:51:47 +00:00
access window._lact directly
This commit is contained in:
@ -47,9 +47,6 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
global.reload = () =>
|
global.reload = () =>
|
||||||
remote.getCurrentWindow().webContents.loadURL(config.get("url"));
|
remote.getCurrentWindow().webContents.loadURL(config.get("url"));
|
||||||
|
|
||||||
// Block "You still there?" popup by setting last active time to date.now every 15min
|
// Blocks the "Are You Still There?" popup by setting the last active time to Date.now every 15min
|
||||||
const activityScript = document.createElement('script');
|
setInterval(() => window._lact = Date.now(), 900000);
|
||||||
activityScript.textContent = `setInterval(() => window._lact = Date.now(), 900000);`;
|
|
||||||
(document.head || document.documentElement).appendChild(activityScript);
|
|
||||||
activityScript.remove();
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user