mirror of
https://github.com/danbulant/dribbblish-dynamic-theme
synced 2026-05-24 12:35:05 +00:00
Merge pull request #55 from Daksh777/patch-1
Hide upgrade button, upgrade to premium menu entry and ad placeholder
This commit is contained in:
commit
75110b685c
2 changed files with 1256 additions and 1224 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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue