brcontainer / prevent-duplicate-tabs

Simple add-on/extension for prevent duplicate tabs
MIT License
62 stars 7 forks source link

[Feature / issue] Would like to close accidental new tabs, keep old and switch to it #17

Open jaxjexjox opened 3 years ago

jaxjexjox commented 3 years ago

Example might make this easier.

I have a reddit post open, creating a new post on reddit.com/subreddit I have typed in 500 characters of stuff. I foolishly, tab away a few minutes, forget and re-open a new copy of reddit.com/subreddit

I would like the program to either: Switch me to that tab. or, preferably, 'pull' that tab, to my new, current tab location.

I definitely, don't want to close the older tab, with form data inside it.

I can't (Seem) to find a way to recreate this with the tool? Thank you.

jaxjexjox commented 3 years ago

(note, I'm using Edge) and thanks for your hard work.

brcontainer commented 3 years ago

@jaxjexjox There is an issue like this, precisely about preventing closing when there is something in the form, the problem is that many forms on sites are simulated, I mean they have normal inputs and buttons, but their request is not a form in fact and to do this type of detection will have to detect as many real forms (which is simpler) as simulated forms (this one is complicated).

But I'll work on it anyway, I can't give guarantees on simulated forms, but on normal forms I'll make an effort, anyway understand that for this I won't be able to use the native chromextension APIs, I'll have to manipulate the DOM and do some workarounds .

Anyway this will be a "BETA" feature, I'll leave it active by default, but with no guarantees of functioning (as long as it's BETA), which will require feedback from users, if it's working well, or where it failed, explaining the step-by-step detail how the failure occurred and so that I can reproduce the failure without difficulty.

I will send the version with this feature soon and let you know (probably on Saturday - 2021-09-18)

jaxjexjox commented 3 years ago

Thank you, I can tell you that several people have nailed this on Chrome before, tho those plugins have had other issues, so I've disabled them.

Duplicate tab elimination is very useful for ADHD brain types or just generally disorganised people. My record is in excess of 3,500 tabs and a plethora are duplicates. 7/10 times, closing the duplicates would be a nil issue but occassionally I've pumped a whole heap of content into one.

Also the behaviour on what to do, once a duplicate is found varies from user to user, some people wanting the program to 'move on over' to the location of the existing tab, others, like me, wanting to 'pull' the existing tab into the new spot where I'm requesting that URL.

Regardless, thanks for the hard work, it's appreciated.

dansteen commented 2 years ago

Hi @brcontainer!
Thanks for the great work on this extension - it really enhances my work-life, and has made a huge difference to my productivity!

I would also love to see a "jump to existing tab" feature. I think that is the final piece of the productivity puzzle for me!

Thanks again!

gustavo-rivera-tierconnect-com commented 2 years ago

Yes please provide option to automatically switch to existing tab when configured to close new duplicate tab.