How to listen to uninstallation event in javascript from a chrome extension?

前端 未结 2 1844
余生分开走
余生分开走 2021-01-22 18:16

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_

2条回答
  •  清歌不尽
    2021-01-22 19:11

    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

提交回复
热议问题