-
Notifications
You must be signed in to change notification settings - Fork 907
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
Allow external runtime messages so that other extensions can interface with the suspender #276
Comments
Reference in chrome.runtime docs: https://developer.chrome.com/extensions/runtime#event-onMessageExternal https://developer.chrome.com/extensions/runtime#event-onMessage |
Given that this seems like very specific use case for you, it might be best to for the extension and make your own changes. Alternately, you could commit a pull request with the changes you made. |
Hi Dan, Thanks for your reply. I think it would be a very broadly-applicable change to make, since it allows any other extension to make use of the suspend tab functionality by exposing the API. Thanks for the awesome work of making this extension, as it's saved me lots of system-resource-contention headaches in an environment where I open many tabs but don't need to work on all of them right away. I'll submit a pull request with the simple change necessary, and hopefully it's clear and simple enough to warrant a commit :) |
I don't make the extension, just merely contribute. :) |
:3 fair enough, thanks for your contributions! |
It looks like the external message api has been pretty badly broken for a while. This has just been remedied in the above commit and there is now a new api. It has two endpoints which must be called as follows:
where tabId must be an integer, but is optional. if it is omitted, the action will default to the currently focused tab. the call will return a |
I have ceased to work at the company that initially wanted me to develop an extension making use of this feature, hahaha! I ended up - at the time - using some kind of hack where I used |
Hi @deanoemcke Do you have a release date planned for this update? I have an update in my extension (ClutterFree) that will use this feature to communicate with TGS, and wanted to time it based on your release schedule. Cheers! Adi |
@adityabhaskar afaik the current dev build is bug free :touchwood: |
I have a use-case where I have an extension which helps my efficiency at work. I'd like to have my extension listen on certain pages and suspend them as soon as they open, so I can spawn the tabs without taking up much memory.
I want to have the content script send a message to the runtime when it's on a page which matches, however the issue is that currently, the background.js uses the following pattern:
...etc.
By extracting that function and simply doing both
and
This would enable the extension to receive events from other extensions which want to use the suspend functionality in a more specific manner.
The text was updated successfully, but these errors were encountered: