javascript - Chrome Extension popup.html html injection from with background script -
Currently I'm using chrome.browserAction.onClicked.addListener so that the icon can be clicked and crap.js You can call each method from Set up the popup page.
chrome.browserAction.onClicked.addListener (function (tab) {// removed when user click ICON chrome.tabs.executeScript (tab.id, {"file": "Js / Crap.js "}, function () {// execute your code console.log (" execute scripts .. "); // notification upon completion};) Chrome Browser Action. Setup ({popup:" Popup .html "});}); I have the following jquery code at integrated content.js in both scripts in popup.html and manifest.json $ ("p"). Attached ("hunter"); $ ("#sectionA") .html ("& lt; p> All New Content. & Lt; em & gt; You Can Bet! ; ");
But it does not seem to work. I was wondering if it is possible to pass my values to select.js in the background in content.js for popup.html.
Besides this, I have seen that every time I can set up a popup HTML, to call crap.js again, is there any alternative solution for this?
Many thanks, John
Comments
Post a Comment