mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
new auto confirm when paused
This commit is contained in:
10
preload.js
10
preload.js
@ -5,7 +5,6 @@ const { remote } = require("electron");
|
||||
const config = require("./config");
|
||||
const { fileExists } = require("./plugins/utils");
|
||||
const setupFrontLogger = require("./providers/front-logger");
|
||||
const setupSongControl = require("./providers/song-controls-front");
|
||||
const setupSongInfo = require("./providers/song-info-front");
|
||||
|
||||
const plugins = config.plugins.getEnabled();
|
||||
@ -41,13 +40,16 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
// inject song-info provider
|
||||
setupSongInfo();
|
||||
|
||||
// inject song-control provider
|
||||
setupSongControl();
|
||||
|
||||
// inject front logger
|
||||
setupFrontLogger();
|
||||
|
||||
// Add action for reloading
|
||||
global.reload = () =>
|
||||
remote.getCurrentWindow().webContents.loadURL(config.get("url"));
|
||||
|
||||
// Block "You still there?" popup by setting last active time to date.now every 15min
|
||||
const activityScript = document.createElement('script');
|
||||
activityScript.textContent = `setInterval(() => window._lact = Date.now(), 900000);`;
|
||||
(document.head || document.documentElement).appendChild(activityScript);
|
||||
activityScript.remove();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user