mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
Merge pull request #673 from Araxeus/force-show-like-buttons
feat: option to force show like buttons
This commit is contained in:
13
menu.js
13
menu.js
@ -79,6 +79,9 @@ const mainMenuTemplate = (win) => {
|
|||||||
config.setMenuOption("options.resumeOnStart", item.checked);
|
config.setMenuOption("options.resumeOnStart", item.checked);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "Visual Tweaks",
|
||||||
|
submenu: [
|
||||||
{
|
{
|
||||||
label: "Remove upgrade button",
|
label: "Remove upgrade button",
|
||||||
type: "checkbox",
|
type: "checkbox",
|
||||||
@ -87,6 +90,16 @@ const mainMenuTemplate = (win) => {
|
|||||||
config.setMenuOption("options.removeUpgradeButton", item.checked);
|
config.setMenuOption("options.removeUpgradeButton", item.checked);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "Force show like buttons",
|
||||||
|
type: "checkbox",
|
||||||
|
checked: config.get("options.ForceShowLikeButtons"),
|
||||||
|
click: (item) => {
|
||||||
|
config.set("options.ForceShowLikeButtons", item.checked);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: "Single instance lock",
|
label: "Single instance lock",
|
||||||
type: "checkbox",
|
type: "checkbox",
|
||||||
|
|||||||
14
preload.js
14
preload.js
@ -83,9 +83,17 @@ function onApiLoaded() {
|
|||||||
|
|
||||||
// Remove upgrade button
|
// Remove upgrade button
|
||||||
if (config.get("options.removeUpgradeButton")) {
|
if (config.get("options.removeUpgradeButton")) {
|
||||||
const upgradeButtton = document.querySelector('ytmusic-pivot-bar-item-renderer[tab-id="SPunlimited"]')
|
const upgradeButton = document.querySelector('ytmusic-pivot-bar-item-renderer[tab-id="SPunlimited"]')
|
||||||
if (upgradeButtton) {
|
if (upgradeButton) {
|
||||||
upgradeButtton.style.display = "none";
|
upgradeButton.style.display = "none";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Force show like buttons
|
||||||
|
if (config.get("options.ForceShowLikeButtons")) {
|
||||||
|
const likeButtons = document.querySelector('ytmusic-like-button-renderer')
|
||||||
|
if (likeButtons) {
|
||||||
|
likeButtons.style.display = 'inherit';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user