|
@@ -17,7 +17,7 @@
|
|
|
// @license AGPL-3.0-only
|
|
|
// @author Sv443
|
|
|
// @copyright Sv443 (https://github.com/Sv443)
|
|
|
-// @icon http://localhost:8710/assets/images/logo/logo_48.png?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
+// @icon https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/images/logo/logo_48.png?b=de9d4f5
|
|
|
// @match https://music.youtube.com/*
|
|
|
// @match https://www.youtube.com/*
|
|
|
// @run-at document-start
|
|
@@ -34,38 +34,38 @@
|
|
|
// @grant GM.xmlHttpRequest
|
|
|
// @grant unsafeWindow
|
|
|
// @noframes
|
|
|
-// @resource css-anchor_improvements http://localhost:8710/assets/style/anchorImprovements.css?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource css-fix_spacing http://localhost:8710/assets/style/fixSpacing.css?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource doc-changelog http://localhost:8710/changelog.md?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource icon-advanced_mode http://localhost:8710/assets/icons/plus_circle_small.svg?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource icon-arrow_down http://localhost:8710/assets/icons/arrow_down.svg?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource icon-delete http://localhost:8710/assets/icons/delete.svg?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource icon-error http://localhost:8710/assets/icons/error.svg?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource icon-experimental http://localhost:8710/assets/icons/beaker_small.svg?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource icon-globe http://localhost:8710/assets/icons/globe.svg?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource icon-help http://localhost:8710/assets/icons/help.svg?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource icon-lock http://localhost:8710/assets/icons/lock.svg?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource icon-lock_off http://localhost:8710/assets/icons/lock_off.svg?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource icon-link http://localhost:8710/assets/icons/link.svg?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource icon-link_off http://localhost:8710/assets/icons/link_off.svg?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource icon-lyrics http://localhost:8710/assets/icons/lyrics.svg?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource icon-skip_to http://localhost:8710/assets/icons/skip_to.svg?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource icon-spinner http://localhost:8710/assets/icons/spinner.svg?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource img-logo http://localhost:8710/assets/images/logo/logo_48.png?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource img-close http://localhost:8710/assets/images/close.png?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource img-discord http://localhost:8710/assets/images/external/discord.png?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource img-github http://localhost:8710/assets/images/external/github.png?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource img-greasyfork http://localhost:8710/assets/images/external/greasyfork.png?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource img-openuserjs http://localhost:8710/assets/images/external/openuserjs.png?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource trans-de_DE http://localhost:8710/assets/translations/de_DE.json?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource trans-en_US http://localhost:8710/assets/translations/en_US.json?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource trans-en_UK http://localhost:8710/assets/translations/en_UK.json?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource trans-es_ES http://localhost:8710/assets/translations/es_ES.json?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource trans-fr_FR http://localhost:8710/assets/translations/fr_FR.json?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource trans-hi_IN http://localhost:8710/assets/translations/hi_IN.json?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource trans-ja_JA http://localhost:8710/assets/translations/ja_JA.json?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource trans-pt_BR http://localhost:8710/assets/translations/pt_BR.json?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
-// @resource trans-zh_CN http://localhost:8710/assets/translations/zh_CN.json?b=d21a8627-cfcc-464c-8327-c830b60ac457
|
|
|
+// @resource css-anchor_improvements https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/style/anchorImprovements.css?b=de9d4f5
|
|
|
+// @resource css-fix_spacing https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/style/fixSpacing.css?b=de9d4f5
|
|
|
+// @resource doc-changelog https://raw.githubusercontent.com/Sv443/BetterYTM/develop/changelog.md?b=de9d4f5
|
|
|
+// @resource icon-advanced_mode https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/icons/plus_circle_small.svg?b=de9d4f5
|
|
|
+// @resource icon-arrow_down https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/icons/arrow_down.svg?b=de9d4f5
|
|
|
+// @resource icon-delete https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/icons/delete.svg?b=de9d4f5
|
|
|
+// @resource icon-error https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/icons/error.svg?b=de9d4f5
|
|
|
+// @resource icon-experimental https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/icons/beaker_small.svg?b=de9d4f5
|
|
|
+// @resource icon-globe https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/icons/globe.svg?b=de9d4f5
|
|
|
+// @resource icon-help https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/icons/help.svg?b=de9d4f5
|
|
|
+// @resource icon-lock https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/icons/lock.svg?b=de9d4f5
|
|
|
+// @resource icon-lock_off https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/icons/lock_off.svg?b=de9d4f5
|
|
|
+// @resource icon-link https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/icons/link.svg?b=de9d4f5
|
|
|
+// @resource icon-link_off https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/icons/link_off.svg?b=de9d4f5
|
|
|
+// @resource icon-lyrics https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/icons/lyrics.svg?b=de9d4f5
|
|
|
+// @resource icon-skip_to https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/icons/skip_to.svg?b=de9d4f5
|
|
|
+// @resource icon-spinner https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/icons/spinner.svg?b=de9d4f5
|
|
|
+// @resource img-logo https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/images/logo/logo_48.png?b=de9d4f5
|
|
|
+// @resource img-close https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/images/close.png?b=de9d4f5
|
|
|
+// @resource img-discord https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/images/external/discord.png?b=de9d4f5
|
|
|
+// @resource img-github https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/images/external/github.png?b=de9d4f5
|
|
|
+// @resource img-greasyfork https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/images/external/greasyfork.png?b=de9d4f5
|
|
|
+// @resource img-openuserjs https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/images/external/openuserjs.png?b=de9d4f5
|
|
|
+// @resource trans-de_DE https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/translations/de_DE.json?b=de9d4f5
|
|
|
+// @resource trans-en_US https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/translations/en_US.json?b=de9d4f5
|
|
|
+// @resource trans-en_UK https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/translations/en_UK.json?b=de9d4f5
|
|
|
+// @resource trans-es_ES https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/translations/es_ES.json?b=de9d4f5
|
|
|
+// @resource trans-fr_FR https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/translations/fr_FR.json?b=de9d4f5
|
|
|
+// @resource trans-hi_IN https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/translations/hi_IN.json?b=de9d4f5
|
|
|
+// @resource trans-ja_JA https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/translations/ja_JA.json?b=de9d4f5
|
|
|
+// @resource trans-pt_BR https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/translations/pt_BR.json?b=de9d4f5
|
|
|
+// @resource trans-zh_CN https://raw.githubusercontent.com/Sv443/BetterYTM/develop/assets/translations/zh_CN.json?b=de9d4f5
|
|
|
// @require https://cdn.jsdelivr.net/npm/@sv443-network/[email protected]/dist/index.global.js
|
|
|
// @require https://cdn.jsdelivr.net/npm/[email protected]/dist/fuse.basic.js
|
|
|
// @require https://cdn.jsdelivr.net/npm/[email protected]/lib/marked.umd.js
|
|
@@ -297,7 +297,7 @@ var PluginIntent;
|
|
|
})(PluginIntent || (PluginIntent = {}));const modeRaw = "development";
|
|
|
const branchRaw = "develop";
|
|
|
const hostRaw = "github";
|
|
|
-const buildNumberRaw = "3726b61";
|
|
|
+const buildNumberRaw = "de9d4f5";
|
|
|
/** The mode in which the script was built (production or development) */
|
|
|
const mode = (modeRaw.match(/^#{{.+}}$/) ? "production" : modeRaw);
|
|
|
/** The branch to use in various URLs that point to the GitHub repo */
|
|
@@ -888,8 +888,8 @@ class BytmDialog extends NanoEmitter {
|
|
|
}
|
|
|
/** Clears the DOM of the dialog and removes all event listeners */
|
|
|
destroy() {
|
|
|
- this.events.emit("destroy");
|
|
|
this.unmount();
|
|
|
+ this.events.emit("destroy");
|
|
|
this.unsubscribeAll();
|
|
|
}
|
|
|
//#MARKER static
|
|
@@ -5145,13 +5145,13 @@ function retranslateWelcomeMenu() {
|
|
|
"#bytm-welcome-text-line4": (e) => e.innerHTML = t("welcome_text_line_4", ...getLink(pkg.funding.url)),
|
|
|
"#bytm-welcome-text-line5": (e) => e.innerHTML = t("welcome_text_line_5", ...getLink(pkg.bugs.url)),
|
|
|
};
|
|
|
- for (const [selector, cb] of Object.entries(changes)) {
|
|
|
- const elem = document.querySelector(selector);
|
|
|
- if (!elem) {
|
|
|
- warn(`Couldn't find element ${selector} in welcome menu`);
|
|
|
+ for (const [selector, fn] of Object.entries(changes)) {
|
|
|
+ const el = document.querySelector(selector);
|
|
|
+ if (!el) {
|
|
|
+ warn(`Couldn't find element in welcome menu with selector '${selector}'`);
|
|
|
continue;
|
|
|
}
|
|
|
- cb(elem);
|
|
|
+ fn(el);
|
|
|
}
|
|
|
}
|
|
|
/** Closes the welcome menu if it is open. If a bubbling event is passed, its propagation will be prevented. */
|