mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-17 05:02:06 +00:00
Merge pull request #434 from Araxeus/remove-upgrade-button
remove upgrade button + makes images unselectable
This commit is contained in:
8
menu.js
8
menu.js
@ -79,6 +79,14 @@ const mainMenuTemplate = (win) => {
|
|||||||
config.set("options.resumeOnStart", item.checked);
|
config.set("options.resumeOnStart", item.checked);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "Remove upgrade button",
|
||||||
|
type: "checkbox",
|
||||||
|
checked: config.get("options.removeUpgradeButton"),
|
||||||
|
click: (item) => {
|
||||||
|
config.set("options.removeUpgradeButton", item.checked);
|
||||||
|
},
|
||||||
|
},
|
||||||
...(is.windows() || is.linux()
|
...(is.windows() || is.linux()
|
||||||
? [
|
? [
|
||||||
{
|
{
|
||||||
|
|||||||
@ -76,4 +76,9 @@ function listenForApiLoad() {
|
|||||||
|
|
||||||
function onApiLoaded() {
|
function onApiLoaded() {
|
||||||
document.dispatchEvent(new CustomEvent('apiLoaded', { detail: api }));
|
document.dispatchEvent(new CustomEvent('apiLoaded', { detail: api }));
|
||||||
|
|
||||||
|
// Remove upgrade button
|
||||||
|
if (config.get("options.removeUpgradeButton")) {
|
||||||
|
document.querySelector('ytmusic-pivot-bar-item-renderer[tab-id="SPunlimited"]')?.style.display = "none";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,3 +28,9 @@ ytmusic-search-box.ytmusic-nav-bar {
|
|||||||
ytmusic-mealbar-promo-renderer {
|
ytmusic-mealbar-promo-renderer {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Disable Image Selection */
|
||||||
|
img {
|
||||||
|
-webkit-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user