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

Enhancement idea: Option to display duplicated tabs only #111

Open
do-bo opened this issue Nov 22, 2020 · 9 comments
Open

Enhancement idea: Option to display duplicated tabs only #111

do-bo opened this issue Nov 22, 2020 · 9 comments

Comments

@do-bo
Copy link

do-bo commented Nov 22, 2020

Hello,

First of all, thank you for developing this addon!

I have an enhancement idea: a checkbox to only display duplicated tabs (by title), with maybe an additional selector to also filter by URL.

I read issue #50, but the end result there was an option to sort tabs alphabetically. With many tabs open, this is insufficient for finding duplicated tabs.

Cheers!

@ericpromislow
Copy link
Owner

Missed this suggestion until I went through my "unfocused" inbox. Yeah why not?

Do you consider duplicated tabs ones with the same title? That doesn't sound like a good idea to me, and even URLs doesn't finish the story. Are

http://www.example.com/
https://www.example.com/

duplicates?

What about

http://www.example.com/story#part3
http://www.example.com/story#part4

And

http://www.example.com/story?arg1=value1&arg2=value2
http://www.example.com/story?arg2=value2&arg1=value1

Right now I just show duplicate tabs when the URLs are identical. Think that's the best way to do this.

@do-bo
Copy link
Author

do-bo commented Mar 12, 2021

Hi, thanks for looking into this! I forgot about it myself ;)

Yes, I agree that filtering by the exact URL would be the most useful and safe by default.
Eventually, you could add a checkbox to enable finding duplicated titles if there is demand for that.

@enigmatic-user
Copy link

I know, I'm late to the party...

I'd really like to have a duplicate finder. Exact URL would be fine; having an option (!) to search for duplicates with different protocols, anchors, and maybe even query strings would make it even more valuable for me. One option for all these three deviations would definitely be enough for me (basically a choice between "strict" and "fuzzy" comparison).

Apart from that: Tabhunter is saving my ass several times a day!

@ericpromislow
Copy link
Owner

Interesting, because there are two things going on here:

  1. A checkbox to turn on the feature of showing only tabs with 2 or more instances (and they don't have to show up in the window that way, so if you prefer to sort by position, the tabs are still highlighted)
  2. An optional text field to describe which part of the URL to take into consideration as a dup. For example:
    /[-_\w+]://(.+?)/(?:\?.*)?$/

would match only on the captured part, in this case the part between the protocol:// and the optional query string,.

I think that's a good tradeoff between simplicity of implementation and operation, and actual usefulness.

And it's never too late to start using Tabhunter. Welcome to the party.

@enigmatic-user
Copy link

Sure, a field for a regex description would also be fine for me (I'm a web developer), but many people are struggling with regular expressions, so I'm not sure this is helpful for the majority of the Tabhunter users. I even know quite a handful of developers with merely a basic understanding of regular expressions (if at all).

I'v been using Tabhunter for several years now; I'm just late to this issue (last comment was two years ago). 😉

@ericpromislow
Copy link
Owner

You might have noticed I haven't been too active in this area the last few years. It works fine for me, and like any open-source project it's the sum of the needs of its contributors. I've gotten caught up in a web/js side-project that started as a joke but has taken a life of its own -- you can see it at lirdle.com -- essentially wordle with exactly one wrong answer per line. I think in 10 days it has more users than Tabhunter has picked up since, I believe, 2006.

ok, end of plug. It looks like the best UI for this would just be a checkbox to show "duplicatish URLs" only. Since they're URLs, we have a constrained language to work with. And then the most valuable thing is clearly the domain part. You can ignore protocols, sort query strings as if they're JS objects with key-value pairs, sorting by keys, and then... use Levenshtein distance (https://en.wikipedia.org/wiki/Levenshtein_distance) to do some fuzzy matching

@enigmatic-user
Copy link

Sounds nice to me. And it would be very helpful.

My remark wasn't meant as criticism. I just wanted to explain what I meant with "I'm late to the party." I do understand that your interests have shifted.

And well, I think Tabhunter is heavily underrated. It's hands down the Firefox plugin I'm relying on most (yes, I'm a tab hoarder...), and I constantly recommend it to others who are working with more than a few tabs at a time (developers tend to do that).

@ericpromislow
Copy link
Owner

Thanks, and I definitely didn't take your remarks as criticism, although I had certainly forgotten that issue I answered two years ago.

I'm actually quite proud of this little extension, and naturally agree with you that it's underrated -- every time I get a new machine, I install Firefox, then Tabhunter, and more often than not, before the end of the day I'll have already used it.

Maybe if it came with a word-guessing game more people would be using it :)

@enigmatic-user
Copy link

Maybe if it came with a word-guessing game more people would be using it :)

Well, probably... Or a prompt for ChatGPT/Midjourney/the AI model of your choice. :D

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

No branches or pull requests

3 participants