Good afternoon, I wrote a plugin for chrome, like there is access from the DOM to the page tree from under it. ALERT using jQuery appears, but I just can not, change the style to block, tell me what I'm doing wrong:
Manifesto:
{ "name":" ПОИСК 1.1 ", "description":"ПОИСК ", "manifest_version":2, "version":"1", "permissions":["tabs","<all_urls>"], "browser_action":{ "default_icon":"icon.png", "default_popup":"popup.html" }, "web_accessible_resources": ["LeoScript.js"] , "permissions":["tabs","<all_urls>"] } Popup:
<html> <head> <script src="popup.js"></script> </head> <body> <input type="text" placeholder="найти"> <button type="submit" id="find" value="поиск"> НАЙТИ </button> </body> </html> Js:
$(document).ready(function() { $("#find").click(function(){ $('.ng-hide').css('display', 'block!Important'); }); }); Background handler:
document.addEventListener("DOMContentLoaded", function (){ chrome.tabs.executeScript( {"file": "LeoScript.js"}); });