我在维基读到NoScript是开源的http://en.wikipedia.org/wiki/NoScript,但在官方网站http://noscript.net/上,我找不到任何来源.所以我的问题是:在哪里找到来源?或者,有什么我不明白,源代码不可用?
我尝试在页面上注入内容脚本并使用
console.log("starting addon");
pageMod.PageMod({
include: "*",//tempopary
contentScriptFile: self.data.url("testPreload.js"),
contentScriptWhen: 'start'});
Run Code Online (Sandbox Code Playgroud)
testPreload.js:
console.log('testPreload');
Run Code Online (Sandbox Code Playgroud)
我在日志中看到"启动插件",如果我使用contentScript:"console.log('testPreload')"而不是contentScriptFile我也看到"testPreload".
但是当我使用时,contentScriptFile我会看到"启动插件"而不是"testPreload".我究竟做错了什么?
编辑
错误:Error opening input stream (invalid filename?)
filePath资源://jid1-ktaxagdysynpew-at-jetpack/extension/data/testPreload.js
我有一个链接:
<a href="javascript:someObject.someFunction();" target="_blank" style="color: rgb(225, 233, 41);">someText</a>
除了ie(我尝试ie11)我有这个错误它在任何地方工作正常
This page can’t be displayed.
Make sure the web address //ieframe.dll/dnserror.htm# is correct.
Run Code Online (Sandbox Code Playgroud)
我怎么解决这个问题?
我有一个iframe注入页面,称他为"帮手".因此,由于相同的原始策略,我需要设置iframe域同样是父窗口域.但我无法访问父窗口域.怎么解决?
更新#1
此代码目前适用于二级域:
pathArray = window.location.host.split('.');
var arrLength = pathArray.length;
var domainName = pathArray.slice(arrLength - 2, arrLength).join('.');
document.domain = domainName;
但我需要以某种方式从父窗口获取它而不是依赖于二级域
我尝试插入行:
BEGIN;
SET TRANSACTION READ WRITE;
INSERT INTO soft.lk(time_added, expiration_date)
VALUES (now(), now() + INTERVAL '730 days');
COMMIT;
Run Code Online (Sandbox Code Playgroud)
但有以下错误:
cannot set transaction read-write mode during recovery
Run Code Online (Sandbox Code Playgroud)
什么是恢复.我怎么能插入行?Postgres版本:9.0