mirror of
https://github.com/danbulant/dribbblish-dynamic-theme
synced 2026-05-24 12:35:05 +00:00
change ads to be toggleable
This commit is contained in:
parent
3766db4ab4
commit
4ee54158a9
2 changed files with 33 additions and 16 deletions
|
|
@ -258,6 +258,38 @@ DribbblishShared.config.register({
|
|||
}
|
||||
});
|
||||
|
||||
DribbblishShared.config.register({
|
||||
area: "Ads",
|
||||
type: "checkbox",
|
||||
key: "hideAds",
|
||||
name: "Hide Ads",
|
||||
description: `Hide ads / premium features (see: <a href="https://github.com/Daksh777/SpotifyNoPremium">SpotifyNoPremium</a>)`,
|
||||
defaultValue: false,
|
||||
onAppended: () => {
|
||||
document.styleSheets[0].insertRule(/* css */ `
|
||||
/* Remove upgrade button*/
|
||||
body[hide-ads] .main-topBar-UpgradeButton {
|
||||
display: none
|
||||
}
|
||||
`);
|
||||
document.styleSheets[0].insertRule(/* css */ `
|
||||
/* Remove upgrade to premium button in user menu */
|
||||
body[hide-ads] .main-contextMenu-menuItemButton[href="https://www.spotify.com/premium/"] {
|
||||
display: none
|
||||
}
|
||||
`);
|
||||
document.styleSheets[0].insertRule(/* css */ `
|
||||
/* Remove ad placeholder in main screen */
|
||||
body[hide-ads] .main-leaderboardComponent-container {
|
||||
display: none
|
||||
}
|
||||
`);
|
||||
},
|
||||
onChange: (val) => {
|
||||
document.body.setAttribute("hide-ads", val ? "" : null);
|
||||
}
|
||||
});
|
||||
|
||||
waitForElement(["#main"], () => {
|
||||
DribbblishShared.config.register({
|
||||
type: "select",
|
||||
|
|
|
|||
17
user.css
17
user.css
|
|
@ -1221,19 +1221,4 @@ html.right-expanded-cover.buddyfeed-visible .main-coverSlotExpanded-container {
|
|||
|
||||
.main-actionBar-ActionBarRow button:not(.main-playButton-primary) {
|
||||
color: var(--spice-subtext);
|
||||
}
|
||||
|
||||
/* Remove upgrade button*/
|
||||
.main-topBar-UpgradeButton {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Remove upgrade to premium button in user menu */
|
||||
.main-contextMenu-menuItemButton[href="https://www.spotify.com/premium/"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Remove ad placeholder in main screen */
|
||||
.main-leaderboardComponent-container {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue