Skip to content Skip to sidebar Skip to footer

How To Listen To Uninstallation Event In Javascript From A Chrome Extension?

I'm trying to clean some preferences files when a user uninstall my extension from chrome browser. On google website, http://code.google.com/chrome/extensions/external_extensions.h

Solution 1:

You may use "setUninstallURL" method. Once your extension is being uninstalled, it will open specified URL so that you can do something on your server.

https://developer.chrome.com/extensions/runtime#method-setUninstallURL

Solution 2:

What they mean by that paragraph is if you are uninstalling your software that was bundled with the extension, you should manually uninstall the extension as well by removing registry entries.

There is an uninstall event:

chrome.management.onUninstalled.addListener(function(string id) {...});

It would work for listening to other extensions being uninstalled, but catching your own uninstall with it most likely would not be possible.

Post a Comment for "How To Listen To Uninstallation Event In Javascript From A Chrome Extension?"