javascript - Chrome Extension Manifest issues with web_accessible_resources (Blocked) -
here's manifest:
{ "manifest_version": 2, "name": "jrbot viz extension", "description": "this extension listen tab, open visualizer audio tab", "version": "1.0", "background": { "scripts": ["popup.js", "jquery-1.11.3.min.js"] }, "browser_action": { "default_icon": "icon.png", "default_popup": "popup.html" }, "web_accessible_resources": ["resources/*"], "permissions": [ "activetab", "http://*.google.com/", "https://*.googleapis.com/" ] }
here's script executed on clicking button extension popup:
document.addeventlistener('domcontentloaded', function() { var checkpagebutton = document.getelementbyid('vizualizepage'); checkpagebutton.addeventlistener('click', function() { chrome.tabs.getselected(null, function(tab) { chrome.tabs.executescript(null, {file: "jquery-1.11.3.min.js"}); chrome.tabs.executescript(null, {file: "addviz.js"}); }); }, false); }, false);
and here's addviz.js
script that's executed:
d = document; var exturl = chrome.extension.geturl(""); $('body').prepend('<div id="viz-div" style="background-color: #000; width: 100%; height: 100%; position: absolute; z-index: 100000;"></div>'); $('#viz-div').load(exturl + 'resources/audio-circle.html');
so, acts expected until it's supposed load resources/audio-circle.html
.
the console says: denying load of chrome-extension://[extension id]/resources/audio-circle.html. resources must listed in web_accessible_resources manifest key in order loaded pages outside extension.
as can see, resource folder declared web accessible in manifest, i've confirmed location correct opening referenced url in new tab , html document appears.
i've tried declaring 1 file , removing wildcard didn't change anything.
i've tried placing resource in extension root still same thing.
i've exhausted resources can find on internet regarding proper usage web_accessible_resource
(there's not much), still can't find solution.
any ideas i'm going wrong here?
Comments
Post a Comment