pietervanheijningen / clickbait-remover-for-youtube

Replaces thumbnails and modifies titles of videos on youtube.com
https://chrome.google.com/webstore/detail/clickbait-remover-for-you/omoinegiohhgbikclijaniebjpkeopip
MIT License
368 stars 23 forks source link

Support for mobile version #10

Closed survivor303 closed 4 years ago

survivor303 commented 5 years ago

Please add support m.youtube.com. For now, thumbnails dosnt update on mobile site.

pietervanheijningen commented 5 years ago

Good point, should just be a matter of changing the permissions i think. I'll give it a try when i'm back from my holiday.

pietervanheijningen commented 5 years ago

Ok so I nearly got it working, but i don't know if its a great idea to annoy 5000+ users with this popup:

Screenshot 2019-09-22 at 20 47 44

Which is generated by chrome because I need to change the permissions of the extension.

Besides, i doubt many people will use the feature, as most mobile users probably use youtube via the youtube app.

survivor303 commented 5 years ago

we who dont support youtube ads or want a working background play, uses firefox mobile for it :)

I say yes for this change to happen :100:

ajayyy commented 4 years ago

Not sure if you ended up doing it anyway, but I just wanted to let you know that optional permissions are a thing.

https://developer.chrome.com/extensions/permissions

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/contentScripts/register

Firefox and Chrome use different APIs for this sadly.

Here is my implementation in SponsorBlock: https://github.com/ajayyy/SponsorBlock/blob/master/src/utils.ts#L54

Background page code: https://github.com/ajayyy/SponsorBlock/blob/f33fa2f621034bcc2f93333b7f5e455fa7cf6d5c/src/background.ts#L108 (Firefox requires that it is executed on the background page every time the extension is reloaded)

You should be able to copy-paste those helper functions. I'll grant access to this code under MIT license if you need it (Since the project is GPL).

pietervanheijningen commented 4 years ago

Not sure if you ended up doing it anyway, but I just wanted to let you know that optional permissions are a thing.

https://developer.chrome.com/extensions/permissions

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/contentScripts/register

Firefox and Chrome use different APIs for this sadly.

Here is my implementation in SponsorBlock: https://github.com/ajayyy/SponsorBlock/blob/master/src/utils.ts#L54

Background page code: https://github.com/ajayyy/SponsorBlock/blob/f33fa2f621034bcc2f93333b7f5e455fa7cf6d5c/src/background.ts#L108 (Firefox requires that it is executed on the background page every time the extension is reloaded)

You should be able to copy-paste those helper functions. I'll grant access to this code under MIT license if you need it (Since the project is GPL).

Thanks for letting me know! I think i'll just take the easy route and add m.youtube.com to the permissions, then I can finally close this nearly year old issue 😅

pietervanheijningen commented 4 years ago

Just submitted version 0.2 with m.youtube.com support. Let me know if it breaks.