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

Suspend tabs when opening multiple bookmarks #15

Open
MAnantharaman opened this issue Sep 30, 2020 · 6 comments
Open

Suspend tabs when opening multiple bookmarks #15

MAnantharaman opened this issue Sep 30, 2020 · 6 comments

Comments

@MAnantharaman
Copy link

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

@hrj
Copy link
Owner

hrj commented Oct 1, 2020

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.

@MAnantharaman
Copy link
Author

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:(

@lazymonkey2
Copy link

any news on this?

@hrj
Copy link
Owner

hrj commented Nov 24, 2022

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.

@q2p
Copy link

q2p commented Jul 12, 2023

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

@hrj
Copy link
Owner

hrj commented Jul 12, 2023

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.

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

4 participants