In my Google Chrome extension it adds a javaScript file or code when the user click on the browser action. ex:
chrome.browserAction.onClicked.addListener(function(tab) {
chrome.tabs.executeScript(null,
{code:"document.body.bgColor='red'"});// or any .js code file
});
how can I remove this JavaScript or the code when user click on a button. Assume that there is a code like below triggered when user click on a button.
chrome.tabs.executeScript(null,
{file : "tabcolor.js"});
So i want to stop this tabcolor.js
execution after User click on the same button. How can I do this ?
Is there any method to stop ExecuteScript
?