How to open a url while uninstalling Google Chrome Extension?
I was able to do it in Firefox u开发者_JS百科sing nsIObserverService. Is there anything similar? Any link to proper documentation will be very helpful.
You can now set an uninstall url as of Version 41 of chrome.
https://code.google.com/p/chromium/issues/detail?id=84556
Here is the documentation. https://developer.chrome.com/extensions/runtime#method-setUninstallURL
hths, future people who read this question.
Put it in background or service worker JavaScript file chrome.runtime.setUninstallURL('your URL here');
There are no hooks for uninstall within the Chrome extension API. Feel free to star the following feature if you want to see it included:
http://code.google.com/p/chromium/issues/detail?id=19383
YThere is a new api may be do this thing after the version 20.
chrome.runtime.setUninstallUrl
More datail: http://developer.chrome.com/extensions/runtime.html#method-setUninstallUrl
also has the install hook:
chrome.runtime.onInstalled
More detail: http://developer.chrome.com/extensions/runtime.html#event-onInstalled
For the browser below 20, you have to declare the permission in manifest of "management". And then bind open new tab method to the onUninstalled
More detail: http://developer.chrome.com/extensions/management.html#event-onUninstalled
精彩评论