I recently uninstalled a Chrome extension and when I deleted it, it opened up a new page that was a survey for me to fill out. I've been reading through the Chrome developer docs but can't seem to find how to do this. Any advice?
The extension was Delight for Chrome at https://chrome.google.com/webstore/detail/delight-for-chrome/hehbgjdnbibkndghdlilefececadokpb
Use chrome.runtime.setUninstallURL.
chrome.runtime.setUninstallURL("your-survey-site.com", function() {
var lastError = chrome.runtime.lastError;
if (lastError && lastError.message) {
console.warn(
"Unable to set uninstall URL: " + lastError.message
);
} else {
// The url is set
}
});
Note that the callback is not called before extension is uninstalled, but when the url for uninstalling extension has been set.
You cannot listen for uninstall event from the extension (unless you have a second extension to do that...) to do things before uninstall, like cleanup.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments