Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save saitamanodoruji/2957758 to your computer and use it in GitHub Desktop.
Save saitamanodoruji/2957758 to your computer and use it in GitHub Desktop.
Scriptish0.1.7 に sharedObject を持たせるためのパッチ
--- scriptish-0.1.7-sm+fn+fx/modules/utils/Scriptish_injectScripts.js 2012-01-29 19:24:24.000000000 +0900
+++ scriptish-0.1.7-sm+fn+fx_fixed/modules/utils/Scriptish_injectScripts.js 2012-04-22 18:28:33.598993000 +0900
@@ -37,7 +37,13 @@
if (0 >= scripts.length) return;
let unsafeContentWin = safeWin.wrappedJSObject;
+
+ var sharedObject = {};
+ sharedObject.window = sharedObject;
+ sharedObject.__proto__ = new XPCNativeWrapper(unsafeContentWin);
+
let delays = [];
+
let winID = Scriptish_getWindowIDs(safeWin).innerID;
Scriptish_windowUnloader(function() {
@@ -91,6 +97,9 @@
});
sandbox.unsafeWindow = unsafeContentWin;
+
+ sandbox.sharedObject = sharedObject;
+
sandbox.__proto__ = safeWin;
let delay = script.delay;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment