Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add styles to hide 'Includes Paid Promotion' elements #2684

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

peterdanwan
Copy link

This pull request attempts to close #2634.

As discussed in #2634, certain videos include a clickable link on top of the video titled, Includes Paid Promotion as shown in the video below:

2024-11-18.20-09-28.mp4

With the changes made, the extension now hides the HTML elements related to the Includes Paid Promotion link:

2024-11-18.20-07-57.mp4

Please let me know if there's anything else I should change - I'm happy to learn and fix more issues!

@ImprovedTube
Copy link
Member

hi! thanks @peterdanwan!

  • button in our menu skeleton, so the feature isn't always activated.
  • name in the locales (at least the english one)

structure is always increasing in relevance, especially for simple features (we are approaching 200.) Compare: #2251

(from #2676 (comment))

@peterdanwan
Copy link
Author

Hi @ImprovedTube, thank you for the tips! I'll try and study the pull request you linked and upload my changes ASAP

@peterdanwan
Copy link
Author

peterdanwan commented Nov 23, 2024

Hello @ImprovedTube, just wanted to give a progress update.

I was able to add a switch to the Player Menu, called Hide Includes Paid Promotion. However, it's not fully functional yet.

Currently, the CSS styling I added is applied regardless if I enable or disable the Hide Includes Paid Promotion switch. By chance, do you have any other tips?

Thanks again for your time!

current

@ImprovedTube
Copy link
Member

hi and thank you again! @peterdanwan

  • The name can be Hide: "includes paid promotion"
  • We currently add all user settings to CSS. As attributes of the root this works already before the pages loaded.
    • So that is convenient as you can finish the the feature with out JS: CTRL+F =true in the later commit in the other PR
      • But it is a little better if you inject the css with JS also, first of all depending ImprovedTube.Storage.____ , because Unfortunately browsers might process CSS lines from right to left. Both is fast, but on a long term we ca go back to inject everything with JS, which guarantees it takes 0 cpu when off.
        • Yet we can keep our CSS condition even then, since it also serves another purpose, that it will automatically turn off when the user turns it off.
    • Later we can also support convenience, like uBlockOrigin rules,
      which, for example, makes this project efficient : https://github.com/gijsdev/ublock-hide-yt-shorts/blob/master/list.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hide "Includes Paid Promotion"
2 participants