Peuj / duplicate-tabs-closer

Duplicate Tabs Closer - Detects and closes duplicate tabs for Chrome and Firefox.
GNU General Public License v3.0
168 stars 29 forks source link

whitelist/blacklist discussion #22

Open Peuj opened 5 years ago

Peuj commented 5 years ago

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 https://github.com/Peuj/duplicate-tabs-closer/issues/16#issuecomment-507827079

Peuj commented 5 years ago

@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.

JulianVolodia commented 5 years ago

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

Peuj commented 5 years ago

not at all !!! :D

ouuan commented 4 years ago

@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 :thinking:

JulianVolodia commented 4 years ago

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 commented 4 years ago

@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. :smiley:

ouuan commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

My suggestion is ordered set of rules which are:

Iterating throught this ordered set/list.

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 commented 4 years ago

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 commented 4 years ago

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:

Now about the rules:

JulianVolodia commented 4 years ago

Great @Peuj What about @ouuan ?

(offtop: agree with You both)

Peuj commented 4 years ago

@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. :smirk:

JulianVolodia commented 4 years ago

@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 commented 4 years ago

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 commented 2 years ago

ignore urls maybe more clear

shawn-yee commented 2 years ago

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