videospeed icon indicating copy to clipboard operation
videospeed copied to clipboard

Add Whitelist functionality

Open MartinLichtblau opened this issue 5 years ago • 16 comments

A whitelist would be a great addition. If you want it only on certain sites it's impossible to do that with the blacklist, since you don't know all the sites you will ever visit. Which is why I think a whitelist makes more sense than a blacklist. I for my part only use it on youtube. Yet it's active on any page that has an embedded video ‒ this is a waste so please replace blacklist with whitelist.

EDIT: Let's be clear about what we're asking. I have edited the title to reflect the request to add whitelist functionality (which of course, might imply taking the place of the blacklist depending on how it is solutioned)

MartinLichtblau avatar May 27 '19 08:05 MartinLichtblau

This seems like a good idea. I will work on it.

thrashbun avatar Jun 05 '19 15:06 thrashbun

I second this!

joaofbravo avatar Jun 23 '19 15:06 joaofbravo

@jacobcolbert any news?

naturallymitchell avatar Aug 10 '19 15:08 naturallymitchell

@jacobcolbert any news?

Nope. Haven't worked on it at all and am super busy with dissertation. If anyone wants to take it on, by all means go for it!

thrashbun avatar Aug 16 '19 15:08 thrashbun

It's already implemented! Click on Manage Extension or directly to URL chrome://extensions/?id=nffaoalbilbmmfgbnbgppjihopabppdk and allow Site access only on specific sites, e.g. "https://www.youtube.com/*". This is effectively a whitelist 👍🏼

YET I only realized it because I found a big performance BUG. At least I would call it so. Performance suffers greatly if DOM changes happen. I see 100% loading time increase and the page becomes noticeably unresponsive. But this bug effect all websites and esp. such with lots of DOM changes, which most modern single page applications are. So for now I only allow it to run on specific sites. I found a solution for myself, but I think all users deserve a fix :-)

MartinLichtblau avatar Nov 18 '19 21:11 MartinLichtblau

That is a good point! But an in house solution would probably be nice as I think many people do not go into those settings.

Could you open a separate issue for that @MartinLichtblau? There is obviously a finite performance hit since we need to track DOM changes, but in the bit of performance probing I've done I've never seen anything like that. Could you list some sites that you remember being particularly unresponsive with VSC turned on?

thrashbun avatar Nov 18 '19 22:11 thrashbun

I found the bug while build a webapp (which I cannot publish) using surveyjs, which rerenders the DOM for every question in the survey. I wasn't a big survey, but still it VSC had a great negative impact. I guess some MutationObservers are the cause of the problem. I don't have time and it has a low prio for me. Sorry, but feel free to start a new issue.

MartinLichtblau avatar Nov 21 '19 18:11 MartinLichtblau

Closing, let's open a new issue to track this.. if there is interest :)

igrigorik avatar Dec 23 '19 20:12 igrigorik

Why have you closed this issue? A whitelist is important imo.

A thing I would like to do:

Only change playback speed on Twitch VODs (https://www.twitch.tv/videos/) but not on normal streams.

BubiBalboa avatar Dec 30 '19 16:12 BubiBalboa

@silentbrains It took a bit of figuring out, but here's how to write a whitelist that works within VSC's blacklist:

/?^(?!.*foo)

where foo is the domain text you'd like to whitelist. VSC forces all blacklist regex to start with /, else ^(?!.*foo) would work.

ZacharyTalis avatar Nov 07 '20 08:11 ZacharyTalis

@silentbrains Oh that's superb!! And very helpful for folks coming to this issue.

ZacharyTalis avatar Nov 08 '20 23:11 ZacharyTalis

@BubiBalboa I think the reason for closure was a trifecta of ambiguity, slow response, and the functionality somewhat already existing. The intent for opening a new issue is to resolve these problems... however, i think we can reopen if we can clear up the first two (ambiguity and slow response).

I will reopen, but please help is be very precise about what we're asking here. Discussion of performance impacts really should be opened in a new bug (bonus points for referencing this one in it)

That said, I'm pretty sure the wishes of @igrigorik is that we have good defaults and an easy to use uncluttered interface. In an ideal world, people just download the extension and use it - no need to ever know the configuration interface exists. If we start adding more lists we risk a confusing and potentially intimidating user experience for those less tech savvy.

ChadBailey avatar Nov 09 '20 19:11 ChadBailey

A thing I would like to do:

Only change playback speed on Twitch VODs (https://www.twitch.tv/videos/) but not on normal streams.

This seems like a reasonable default, particularly given how much traffic twitch sees. Perhaps we should consider adding this as a default value? If we end up implementing a fix for this, I could see this potentially being a part of that fix

ChadBailey avatar Nov 09 '20 19:11 ChadBailey

If you want it only on certain sites it's impossible to do that with the blacklist, since you don't know all the sites you will ever visit.

I would consider this an anti-pattern. If someone downloads this extension, their assumption is that it allows controlling of video speed on any website. It would not make sense for it to only work when you've explicitly requested it to work.

That said, I think I may see an argument for perhaps improving the UI a bit. How could we redesign the UI to have a toggle which makes it clear that we are either allowing or disallowing the extension from working? Some verbiage I think would make sense to a lay person: "Enable video speed control for the following websites", "Disable video speed control for the following websites" but I'm unsure how that would be incorporated as a toggle

ChadBailey avatar Nov 09 '20 19:11 ChadBailey

I've seen add-ons that let you choose between something like "Enable/Disable for this URL" and "Enable/Disable for this domain" and then show you the example e.g. youtube.com or youtube.com/subscriptions.

The way Stylus does it is fairly intuitive. I think that's understandable enough for people who use browser add-ons.

And I think this should be handled directly in the pop-up from pressing the add-on button as that's probably the only setting I change after the initial set up.


silentbrains' solution doesn't work for me unfortunately but that might be because I'm using the forked Firefox version. I don't know how up-to-date this fork is. Would be cool to have an official Firefox version from you guys btw. But that's not the point of this issue.

BubiBalboa avatar Nov 09 '20 20:11 BubiBalboa

It's also quite annoying to try to write a multiple domain whitelist regex with wildcard subdomains as well. Given the performance implication on certain dom actions, It would be great to implement a whitelist/blacklist switch

whatsnewsisyphus avatar Jul 16 '21 16:07 whatsnewsisyphus