问题
Trying to port some Chrome extension and getting this Security Error: Content at "http://example.com" may not load or link to "moz-extension://04d69802-c26f-47ae-86f2-d54650455e5a/blocks/indicators/__icon/indicators__icon-tweet.png"
(function () {
'use strict';
var PATHS = {
TWITTER: chrome.extension.getURL("blocks/indicators/__icon/indicators__icon-tweet.png")
};
})();
In manifest.json this path is in web_accessible_resources.
回答1:
To get rid of this error, full path should be provided.
"web_accessible_resources": [
"blocks/indicators/__icon/indicators__icon-tweet.png"
]
No "blocks/indicators/*
.
来源:https://stackoverflow.com/questions/36960630/security-error-in-firefox-webextension-when-trying-geturl-image