diff options
author | Ruben Rodriguez <ruben@gnu.org> | 2015-12-22 18:00:51 -0600 |
---|---|---|
committer | Ruben Rodriguez <ruben@gnu.org> | 2015-12-22 18:00:51 -0600 |
commit | 6770b5e366c28c7b2378bef29c5817a45eb45214 (patch) | |
tree | d057bc00063f46d0dbeb3b353a2178b87bd5761d /data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/scriptish/userscript-sandbox.js | |
parent | 541c887981ef5b5f8d7128c410461e6c8575c58e (diff) |
Updated LibreJS from 6.0.10 pre-release to 6.0.10 final
Diffstat (limited to 'data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/scriptish/userscript-sandbox.js')
-rw-r--r-- | data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/scriptish/userscript-sandbox.js | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/scriptish/userscript-sandbox.js b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/scriptish/userscript-sandbox.js index 1c92066..45f1f1a 100644 --- a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/scriptish/userscript-sandbox.js +++ b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/scriptish/userscript-sandbox.js @@ -1,24 +1,24 @@ -'use strict'; - -var { Cc, Ci, Cu } = require('chrome'); -var {GM_API} = require("./greasemonkey-api"); - -exports.createSandbox = function createSandbox(safeWin, userScript, aURL) { - var script = userScript.source; - var sandbox = new Cu.Sandbox(safeWin); - sandbox.window = safeWin; - sandbox.document = sandbox.window.document; - sandbox.__proto__ = safeWin; - var api = new GM_API(userScript, aURL, null, safeWin, safeWin.wrappedJSObject); - - for (var key in api) { - sandbox[key] = api[key]; - } - - return sandbox; -}; - -exports.evalInSandbox = function(code, sandbox, jsVersion) { - jsVersion = jsVersion || "1.8"; - Cu.evalInSandbox("(function(){"+code+"})();", sandbox, jsVersion); +'use strict';
+
+var { Cc, Ci, Cu } = require('chrome');
+var {GM_API} = require("./greasemonkey-api");
+
+exports.createSandbox = function createSandbox(safeWin, userScript, aURL) {
+ var script = userScript.source;
+ var sandbox = new Cu.Sandbox(safeWin);
+ sandbox.window = safeWin;
+ sandbox.document = sandbox.window.document;
+ sandbox.__proto__ = safeWin;
+ var api = new GM_API(userScript, aURL, null, safeWin, safeWin.wrappedJSObject);
+
+ for (var key in api) {
+ sandbox[key] = api[key];
+ }
+
+ return sandbox;
+};
+
+exports.evalInSandbox = function(code, sandbox, jsVersion) {
+ jsVersion = jsVersion || "1.8";
+ Cu.evalInSandbox("(function(){"+code+"})();", sandbox, jsVersion);
};
\ No newline at end of file |