From 6770b5e366c28c7b2378bef29c5817a45eb45214 Mon Sep 17 00:00:00 2001 From: Ruben Rodriguez Date: Tue, 22 Dec 2015 18:00:51 -0600 Subject: Updated LibreJS from 6.0.10 pre-release to 6.0.10 final --- .../pathfinder/lib/scriptish/userscript-sandbox.js | 46 +++++++++++----------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/scriptish/userscript-sandbox.js') 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 -- cgit v1.2.3