1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-03 07: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:
Kris Maglione
2010-10-07 23:35:53 -04:00
parent 1c62294ef6
commit 655a48384b
2 changed files with 3 additions and 3 deletions

View File

@@ -294,7 +294,7 @@ const Dactyl = Module("dactyl", {
if (!context)
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 () {
jsmodules.__proto__ = window;
dactyl.triggerObserver("load");
dactyl.log("All modules loaded", 3);