mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-06 10:44:13 +01:00
Just use with (window) in userEval. Adding it to the prototype chain causes too much trouble.
--HG-- extra : transplant_source : %040%D8%7E%06m%B1%04D%9E%C0wN%BF%8F%EEo%D9%14%F5
This commit is contained in:
@@ -18,7 +18,8 @@
|
|||||||
__proto__: jsmodules,
|
__proto__: jsmodules,
|
||||||
get content() window.content,
|
get content() window.content,
|
||||||
jsmodules: jsmodules,
|
jsmodules: jsmodules,
|
||||||
newContext: newContext
|
newContext: newContext,
|
||||||
|
window: window
|
||||||
};
|
};
|
||||||
modules.modules = modules;
|
modules.modules = modules;
|
||||||
|
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ const Dactyl = Module("dactyl", {
|
|||||||
|
|
||||||
if (!context)
|
if (!context)
|
||||||
context = userContext;
|
context = userContext;
|
||||||
return Cu.evalInSandbox(str, context, "1.8", fileName, lineNumber);
|
return Cu.evalInSandbox("with (window) {" + str + "}", context, "1.8", fileName, lineNumber);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1876,7 +1876,6 @@ const Dactyl = Module("dactyl", {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
load: function () {
|
load: function () {
|
||||||
jsmodules.__proto__ = window;
|
|
||||||
dactyl.triggerObserver("load");
|
dactyl.triggerObserver("load");
|
||||||
|
|
||||||
dactyl.log("All modules loaded", 3);
|
dactyl.log("All modules loaded", 3);
|
||||||
|
|||||||
Reference in New Issue
Block a user