Skip to content

Instantly share code, notes, and snippets.

@saitamanodoruji
Created October 2, 2012 14:19
Show Gist options
  • Save saitamanodoruji/3819501 to your computer and use it in GitHub Desktop.
Save saitamanodoruji/3819501 to your computer and use it in GitHub Desktop.
Scriptish0.1.8 に sharedObject を持たせるためのパッチ
--- ./scriptish-0.1.8-sm+fx/modules/utils/Scriptish_injectScripts.js 2012-09-23 11:50:46.000000000 +0900
+++ ./scriptish-0.1.8-sm+fx_fixed2/modules/utils/Scriptish_injectScripts.js 2013-01-25 18:22:03.897773724 +0900
@@ -31,6 +31,18 @@
if (0 >= scripts.length) return;
let unsafeContentWin = safeWin.wrappedJSObject;
+
+ var sharedObject = {
+ Minibuffer: null,
+ LDRize: null,
+ AutoPagerize: null,
+ __exposedProps__: {
+ Minibuffer: 'rw',
+ LDRize: 'rw',
+ AutoPagerize: 'rw'
+ }
+ };
+
let winID = Scriptish_getWindowIDs(safeWin).innerID;
let delays = [];
@@ -90,6 +102,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