close pop-up - chrome extensions -
im trying create quite simple chrome extention, close pop-up after pop-up loaded, , title. reason the title keeps returnen blank.
this came with.
{ "name": "reportcloser", "version": "0.1", "permissions": [ "tabs","<all_urls>" ], "browser_action": { "default_icon": "icon.png" }, "content_scripts": [ { "matches": [ "http://*/*", "https://*/*" ], "run_at": "document_end" , "js": ["script.js"] // pay attention line } ], "manifest_version":2 }
script.js
var x = document.title; var title = "customtitle"; if(x==title){ close(); } else{ }
i tried move run_at: document_end before content script, problem still there.
any tips?
Comments
Post a Comment