Skip to content

Commit

Permalink
Merge pull request #2684 from peterdanwan/issue-2634
Browse files Browse the repository at this point in the history
feat: add styles to hide 'Includes Paid Promotion' elements
  • Loading branch information
ImprovedTube authored Dec 4, 2024
2 parents ca4b84e + 0af54f7 commit 66981dc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions _locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,9 @@
"hideHomePageShorts": {
"message": "Hide Shorts on the home page"
},
"hideIncludesPaidPromotion": {
"message": "Hide \"Includes Paid Promotion\""
},
"hideMore": {
"message": "Hide '...'"
},
Expand Down
10 changes: 10 additions & 0 deletions js&css/extension/www.youtube.com/appearance/player/player.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# Hide annotations
# Hide endscreen
# Hide cards
# Hide "Includes Paid Promotion"
# Show cards on mouse hover
# Hide "Scroll for details"
# Player Size
Expand Down Expand Up @@ -653,3 +654,12 @@ html[it-hide-scroll-for-details='true'] button.ytp-fullerscreen-edu-button {
html[it-hide-scroll-for-details='true'] ytd-app[scrolling_] {
overflow: hidden !important;
}

/*--------------------------------------------------------------
# HIDE Includes Paid Promotion
--------------------------------------------------------------*/
html[data-page-type=video][it-hide-includes-paid-promotion=true] .ytp-paid-content-overlay,
html[data-page-type=home][it-hide-includes-paid-promotion=true] .YtmPaidContentOverlayLink,
html[data-page-type=other][it-hide-includes-paid-promotion=true] .YtmPaidContentOverlayLink {
display: none !important;
}
5 changes: 5 additions & 0 deletions menu/skeleton-parts/appearance.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,11 @@ extension.skeleton.main.layers.section.appearance.on.click.player = {
component: "switch",
text: "hideEndscreen"
},
hide_includes_paid_promotion:{
component: 'switch',
text: 'hideIncludesPaidPromotion',
storage: 'hide_includes_paid_promotion',
},
remove_black_bars: {
component: "switch",
text: "removeBlackBars",
Expand Down

0 comments on commit 66981dc

Please sign in to comment.