use centralized config

This commit is contained in:
Araxeus
2023-03-04 15:48:15 +02:00
parent 7b3280c12b
commit ad484ab745
4 changed files with 46 additions and 29 deletions

View File

@ -9,7 +9,6 @@ let progress = null;
const downloadButton = ElementFromFile(
templatePath(__dirname, "download.html")
);
let pluginOptions = {};
let doneFirstLoad = false;
@ -57,9 +56,7 @@ global.download = () => {
ipcRenderer.send('download-song', videoUrl);
};
function observeMenu(options) {
pluginOptions = { ...pluginOptions, ...options };
function observeMenu() {
document.addEventListener('apiLoaded', () => {
observer.observe(document.querySelector('ytmusic-popup-container'), {
childList: true,