I'm trying to click a button and get all links on a page but i cant and i have this error in console 'Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' chrome-extension-resource:"'
MANIFEST.JSON
{
"manifest_version": 2,
"name" : "tat",
"description": "load",
"version": "1.0",
"permissions":["tabs", "http://*/*", "background", "activeTab"],
"content_scripts": [{
"matches": ["http://*/*"],
"js": ["jquery.js","link.js"]
}],
"browser_action": {
"default_title": "lol",
"default-icon":"images/128.png",
"default_popup":"popup.html"
},
"icons":{
"32":"images/32.png",
"128":"images/128.png"
},
"background": {
"page": "background.html"
}
}
POP-UP.HTML
<script type="text/javascript">
var bkg = chrome.extension.getBackgroundPage();
window.addEventListener('load', getAllLinks);
</script>
BACKGROUND.HTML
<script>
var $html = jQuery(html);
var getAllLinks = function(){
var elementStr = "";
var node = document.createElement("li");
$html.find('a').each(function(){
if(elementoLink.item(i).href.indexOf("operadorPerfil= REV") != -1){
elemento.Str += elementoLink.item(i).href+"<br/>";
node.innerText = elementStr;
}
});
}
chrome.tabs.onUpdated.addListener(function(){ // listen to updated tabs
getAllLinks();
});
</script>