sloth icon indicating copy to clipboard operation
sloth copied to clipboard

Suspend tabs when opening multiple bookmarks

Open MAnantharaman opened this issue 4 years ago • 6 comments

Use case: In addition to starting chrome with several tabs from the last session I often open a whole folder of bookmarks at once which has the same hit on performance as starting with lots of tabs. Request: Is it possible to suspend tabs in this case, ideally controlled by an option that by default gives the current behaviour, except when activated (then opening multiple tabs would also suspend them).

MAnantharaman avatar Sep 30 '20 17:09 MAnantharaman

Here's what I understood from your request: A button to enable or disable lazy mode. When in lazy mode, any new tab opened will be automatically "discarded" (suspended), and the previously open tab will retain the focus.

We can try to implement this together, if you are willing to spend the time.

We first need to find a hook that gets called when a new tab is opened. If you see eventPage.js, it is adding listeners to only two hooks: browser startup and icon clicked. We will have to add another listener for new tab opened hook, if we find it.

hrj avatar Oct 01 '20 02:10 hrj

Thanks for responding - and, yes, your understanding is correct - where it ocurred to me that one might need to distinguish between opening just one tab (standard case) - or a whole bunch (my focus). I am happy to help, but am afraid that this is limited to trying out some experimental version - lacking understanding of chrome's interaction- and programming-model - already in the aspects you mentioned last:(

MAnantharaman avatar Oct 01 '20 06:10 MAnantharaman

any news on this?

lazymonkey2 avatar Nov 24 '22 10:11 lazymonkey2

any news on this?

No, afraid not. We need someone who is familiar with Chrome's API. And now that they are going to introduce Manifest V3 or some such thing, this extension might even become obsolete.

hrj avatar Nov 24 '22 16:11 hrj

... And now that they are going to introduce Manifest V3 or some such thing, this extension might even become obsolete.

Why? I've copied your exact code from 4 or so years ago into my personal extension. I haven't changed it ever since, and after updating to MV3, it still suspends tabs the way it used to.

q2p avatar Jul 12 '23 09:07 q2p

Yeah, it works for me too, without changes. I am surprised that they have maintained backward compatibility.

Feel free to point to any extension that you have published. Maybe others who need this functionality will find it useful. PR is welcome too.

hrj avatar Jul 12 '23 11:07 hrj