我已经发表了附加在Mozilla插件的网站,它得到了拒绝,因为远程脚本。
LIB / Main.js:
var data = require("sdk/self").data;
var pageMod = require("sdk/page-mod");
var _workers = [];
pageMod.PageMod({
include: "some url",
contentScriptWhen: "ready",
contentScriptFile: data.url("./inject.js"),
contentStyleFile: data.url("style.css"),
attachTo: 'top'
});
数据/ inject.js:
var script = document.createElement('script');
script.type = "text/javascript";
script1.src = "https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";
document.body.appendChild(script);
var script2 = document.createElement('script');
script2.type = "text/javascript";
script2.src = "https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.js";
document.body.appendChild(script2);
var script3 = document.createElement('script');
script3.type = "text/javascript";
script3.src = "resource://addon-id/addon-name/data/popup.js";
document.body.appendChild(script3);
请帮我插入这些脚本的网页内容或附加我插入本地这些脚本。 什么是远程脚本?