Merge pull request #55 from Daksh777/patch-1

Hide upgrade button, upgrade to premium menu entry and ad placeholder
This commit is contained in:
Erik 2021-10-09 08:46:05 +02:00 committed by GitHub
commit 75110b685c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1256 additions and 1224 deletions

View file

@ -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",

2448
user.css

File diff suppressed because it is too large Load diff