Is there a way to run a callback after extension is disabled/enabled from chrome browser.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Chrome management API()’s
chrome.management.onEnabled.addListener(function(ExtensionInfo info) {})
chrome.management.onDisabled.addListener(function(ExtensionInfo info) {})
notifies changes of enable and disable of extensions.
Ensure you have
in your
manifest.jsonSample Demonstration
P.S : An extension on its own can’t monitor when it gets disabled. You’d need a second extension to monitor this. From extension’s and user’s perspectives, disabling extension has exactly the same effect as closing a browser.
For more information refer documentation.