1 year ago
#273773
Silver Fruity
content.script access file resource always error with net::ERR_BLOCKED_BY_CLIENT, disabled Adblock
I'm migrating V2 to V3, but encountered some strange problems. When extension has loaded, i fetching the resource, it will has a error: net::ERR_BLOCKED_BY_CLIENT. but it's no problem when i do it without loaded extension. like this:
Extension launch up with a error:
GET chrome-extension://hbdmkhahfinoeomfcllpnpkcblpaofeh/css/style.css net::ERR_BLOCKED_BY_CLIENT
'web_accessible_resources' in content.js
var css1 = doc.createElement("link");
css1.href = chrome.runtime.getURL("css/style.css");
css1.type = "text/css";
css1.rel = "stylesheet";
doc.head.appendChild(css1);
code in manifest.json
"web_accessible_resources" : [{
"resources": [ "css/*", "content/*" ],
"matches": ["<all_urls>"]
}],
Converting the txt file to html is the main responsibility of this extension.
I have disabled Adblock Plus, and try to fix this problem pass a whole day, I really don't know what happened in this condition and how to fix it.
google-chrome
google-chrome-extension
content-script
0 Answers
Your Answer