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

whitelist/blacklist discussion #22

Open
Peuj opened this issue Sep 13, 2019 · 17 comments
Open

whitelist/blacklist discussion #22

Peuj opened this issue Sep 13, 2019 · 17 comments
Labels
enhancement New feature or request

Comments

@Peuj
Copy link
Owner

Peuj commented Sep 13, 2019

May I add a question? I'd rather blacklist than whitelist the urls as I only have a small number of urls which are supposed to be deduplicated while all others shall remain unaffected. Is it possible to do this using not in regex?

Originally posted by @caheru in #16 (comment)

@Peuj
Copy link
Owner Author

Peuj commented Sep 13, 2019

@caheru
It's possible, the behavior would be the opposite of what is done today.
The blacklist would be accessible and used only in NOT automatic close mode.
Also as with whitelist you can use regex or not.

@Peuj Peuj added the enhancement New feature or request label Sep 13, 2019
@JulianVolodia
Copy link

@Peuj does whitelist regex allow to use negations? :-)

@Peuj
Copy link
Owner Author

Peuj commented Nov 5, 2019

not at all !!! :D

@ouuan
Copy link

ouuan commented Jul 9, 2020

@Peuj does whitelist regex allow to use negations? :-)

It seems that this works. I'm using ^(?!.*github.com).*$ and it works well. However, it will be better if blacklist is explicitly supported.

BTW, I think it's a little bit strange to ignore whitelist instead of blacklist 🤔

@JulianVolodia
Copy link

BTW, I think it's a little bit strange to ignore whitelist instead of blacklist 🤔

This could be workaround for tendency to change naming conventions of that lists, because @Peuj not favors any of them.

But, I was really not joking - some time name should be change sth like (Allow|Deny)list.

It seems that this works. I'm using ^(?!.*github.com).*$ and it works well. However, it will be better if blacklist is explicitly supported.

btw @ouuan combining the rules for different things is complex thing. Could You prepare some most sophisticated example you could imagine, and if @Peuj will accept that I will be greatful to make change.

@Peuj Peuj changed the title I'd rather blacklist than whitelist the urls whitelist/blacklist discussion Jul 9, 2020
@Peuj
Copy link
Owner Author

Peuj commented Jul 9, 2020

@ouuan You're right, it works but it's not explicitly the goal.

BTW, I think it's a little bit strange to ignore whitelist instead of blacklist

Not sure of what you mean.

I don't use the whitelist and will probably not use the blacklist also.
I've provided this feature from a request but as I don't use it, the behavior could probably be better.

So I've renamed this thread to be an opened discussion about whitelist/blacklist.

Any suggestions with usecases is welcome. 😃

@ouuan
Copy link

ouuan commented Jul 9, 2020

BTW, I think it's a little bit strange to ignore whitelist instead of blacklist

Not sure of what you mean.

I think he/she means "black/whitelist" is related to racism, and "allow/deny list" is better. I read about articles about it, but I seldom think of it, because I don't think it's related to racism.

@JulianVolodia
Copy link

JulianVolodia commented Jul 9, 2020

Any suggestions with usecases is welcome. 😃

@ouuan and @Peuj tell me what you think could be useful.
As I mentioned and seen - that one method of negative regex is mostly one of greatest workaround in older system ;) (kinda Mammoth here)

BTW, I think it's a little bit strange to ignore whitelist instead of blacklist

Not sure of what you mean.

I think he/she means "black/whitelist" is related to racism, and "allow/deny list" is better. I read about articles about it, but I seldom think of it, because I don't think it's related to racism.

yeah, you got it. I agree with You @ouuan but in fact there was many of that kind of black/white lists in history. Like pubs for Black, shops for Nazi. There was a lot of history behind that.

I don't get it even more for github master general branch name which is considered to be changed. We all have ppl getting Masters degree - is it make it bad? I dont think so.

But there could be someone which could be offended because it.

Also, thanks for "he/she". I am he. But in general I know that if you don't know who - you call just they/them @ouuan

@JulianVolodia
Copy link

My suggestion is ordered set of rules which are:

  • blocking closing (which is whitelist)
  • allowing closing (which is blacklist)

Iterating throught this ordered set/list.

  • if any allowed hit - look for any exactly less general blocking rule out there (sub i.e. we want to remove duplicated general pages from slack.com/discord.com but not specifically open ones from some chat rooms - bad example but not know better now)
  • if any blocking hit - stop looking and just block closing (we want github always be open just because; that would be good for some Single Page Apps because they sometimes operate on # fragment part of URI than on URL differentiations)

But, btw. Last time I rarelly use that closing and just add all of things to specific folder of my Starred Tabs list, and then try to reprocess that folder. So, maybe I don't get idea no longer.

@ouuan
Copy link

ouuan commented Jul 9, 2020

In fact I'm OK with these changes as long as they are not breaking changes. I can care about my words when talking with others, but not when using a git alias.

@Peuj
Copy link
Owner Author

Peuj commented Jul 9, 2020

I personally don't care about colors, master, he/she,... Depending of your native language, where you live,.. there are different meanings and what is important is the intention behind the words.
Anyway as it's right that someone could be offended, I'll changed the "black/whitelist" naming.

Going back to main subject, I missed the mode used with the usecases.

Here's my understanding, fell free to comment:

First there are two modes:

  • Close mode ( Close tab automatically)
  • Watch mode (Update badge value)

Now about the rules:

  • Allow duplicate rules (aka whitelist aka blocking closing):
    Used in Close mode to avoid specific duplicate tabs to closed.
    Not used in Watch mode as no action is done.
    I've planned to add a filter in the panel to hide duplicate tabs matching Allow duplicate rules.

  • Close duplicate rules (aka blacklist aka allowing closing):
    Used in Watch mode to close only specific duplicate tabs.
    and/or
    Used in Close mode to override the existing Matching rules

@JulianVolodia
Copy link

Great @Peuj
What about @ouuan ?

(offtop: agree with You both)

@Peuj
Copy link
Owner Author

Peuj commented Jul 11, 2020

@JulianVolodia and @ouuan (and others)

And again, I don't use those features so if there is something you don't need in what I've described let me know.
Obvious remark, but I would like to not loose times to develop and mostly maintain something not used. 😏

@JulianVolodia
Copy link

JulianVolodia commented Jul 12, 2020

@Peuj obvious if asked and everybody ask about. Great to know. I just want to contribute, bc that's very nice project which helped me to decrease my tabs count and then to stop do "read-it-later" lifestyle any longer (that addon work on it with some unexpected mobile Chrome crashes to free me). ;)
Thanks for telling.

@dnknn
Copy link

dnknn commented Jul 27, 2020

  • Whitelist ⠅ global/default OFF, separate/few ON. Just like RegExp: (?=) (?<=)

  • Blacklist ⠅ global/default ON, separate/few OFF. Just like RegExp: (?!) (?<!)

Do you mean like this 👇?
https://chrome.google.com/webstore/detail/nokdeeoiaiicgnonknihiccadnnmpeoh
https://github.com/trambopoline/new-domain-in-new-tab
0727042325

But I think duplicate-tabs-closer is completely enough for now.
Pic-200727_1014

@shawn-yee
Copy link

ignore urls
maybe more clear

@shawn-yee
Copy link

shawn-yee commented Dec 21, 2021

I found this plugin, which implements the whitelist function
It is open source, but the disadvantage is that it has no manual mode and will automatically deduplicate tabs in the background.

https://github.com/marinebox/tab-killer

https://chrome.google.com/webstore/detail/tab-killer/gpmdlohnnmjfoojdcjojoimhkiifcbkl?hl=zh-CN

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

No branches or pull requests

5 participants