Comments (8)
This issue is blocked as there is currently no way for me to perform any asynchronous cleanup job after the user chooses to uninstall (or disable) the extension.
Here is a chromium bug report requesting this be implemented:
One possible (very inadequate) fallback is to redirect the user to a url after uninstallation. This will not prevent users from losing their lost tabs, but it could at least take them to a page which could offer advice on how to recover the lost tabs.
from thegreatsuspender.
I agree this is a very unfortunate behaviour of the extension. However, due to the way that the tabs are suspended there is nothing I can do about it. The pages are unloaded by redirecting to a locally hosted webpage that is part of the extension. When the extension is uninstalled, the webpage that it refers to no longer exists, and so chrome removes that tab from the window.
The workaround is to 'unsuspend all tabs' before uninstalling. However, I appreciate not everyone will know to do this in advance.
from thegreatsuspender.
To investigate:
@ronin13 suggests that the chrome.runtime.onSuspend
listener never gets called due to the extension using a persistent background page: #418
This is because the extension is not using event pages.
Hence,
//wishful thinking here that a synchronus iteration through tab views will enable them //to unsuspend before the application closes chrome.runtime.onSuspend.addListener(function () { chrome.extension.getViews({type: 'tab'}).forEach(function (view) { view.location.reload(); }); });
in background.js never gets triggered.
It needs the background pages to be converted into event pages as described here: https://developer.chrome.com/extensions/event_pages
from thegreatsuspender.
Hello!
This issue is blocked as there is currently no way for me to perform any asynchronous cleanup job after the user chooses to uninstall (or disable) the extension.
Here are some chromium bug reports requesting this be implemented
The issue you're referring has been marked as fixed on Jul 15 2015...
Thanks for your work!
from thegreatsuspender.
Here's a thoroughly kludgy idea: on suspended.html
, inject a hidden iframe pointing at a page on greatsuspender.github.io
, which the extension has access to. Then inject a content script on that page with a dump of the currently suspended page data, which the script then writes to the local storage of the greatsuspender.github.io
page.
When the extension is uninstalled, redirect to that page. It can then read its data from local storage and offer to reopen all the suspended, and now closed, pages. I'm betting Chrome would prevent a webpage from opening dozens of new tabs, so the user might have to manually click each one to reopen it. But better than losing it altogether.
This SO page suggests it might be possible: https://stackoverflow.com/questions/15288648/chrome-extension-write-to-local-storage-of-a-different-domain
But I go back to my suggestion in #688 of redirecting suspended pages to a web-served page instead of a local one, so that it's not closed on uninstall. Obviously doesn't help with the next update, but would with all future ones. May well be some impediment I haven't thought of, though.
from thegreatsuspender.
@meden i don't think it was marked as fixed? there was a resolution in the form of being able to specify an uninstall url which the user would get redirected to after uninstallation. however, this does not block the uninstallation process. it merely opens the requested url maybe before / maybe after the uninstall has taken place.
from thegreatsuspender.
@fwextensions thanks for the idea.
it may well work. i will do some investigation at some point. not for this upcoming release though :(
from thegreatsuspender.
@deanoemcke yes, you're right, the issue has been merged with a related, but different, one. Comment 12, though, mentions an event callback (although I imagine you already looked into it...)
from thegreatsuspender.
Related Issues (20)
- sync tabs from browser to other browser using other extension HOT 1
- Small feature request: New Command: `Suspend all Tabs in the active Window` HOT 1
- Check to see if Suspending will kill video or audio casted to Chromecast
- Your Wiki may have been hacked HOT 2
- Hi! I need to change the configuration defaults programmatically in Raspberry Pi (Linux / Raspbian) as in Windows Group Policies. Is there a configuration file for this?
- Chrome closes all suspended tabs
- Bulk suspended tabs show ... chrome extension, instead of the tab name HOT 6
- TGS will be no longer work after January 2023 for MV2 deprecation
- The great suspender v.7.1.6 is not compatible with Chromium v.104.0.5112.81 HOT 3
- Marvelloous Suspender dosen't work after Chrome updates in August 2022 HOT 6
- No more favicon + no more page screenshot since Chrome update HOT 1
- Opening Incognito Mode While All Tabs in Closed Standard Window are Suspended Reopens Standard and Duplicates Tabs
- error
- Switching to manifest v3 HOT 4
- console.log in file contentscript.js HOT 2
- Extension was removed from chrome store (This extension contains malware) HOT 6
- If you ended up with broken tabs like me, I made a script to fix then!
- 101
- Extension disabled by Chrome today because suspected malware. Version 7.2.6 HOT 5
- White flash when Suspend/Unsuspend active tab HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from thegreatsuspender.