1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-07 17:54:10 +01:00

Apply modules prototype magic earlier. Closes issue #281.

This commit is contained in:
Kris Maglione
2011-01-20 05:51:44 -05:00
parent 40ece9b1d6
commit dfc7f8d33a

View File

@@ -2190,6 +2190,9 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
// TODO: we should have some class where all this guioptions stuff fits well
// Dactyl.hideGUI();
if (dactyl.userEval("typeof document", null, "test.js") === "undefined")
jsmodules.__proto__ = XPCSafeJSObjectWrapper(window);
if (dactyl.commandLineOptions.preCommands)
dactyl.commandLineOptions.preCommands.forEach(function (cmd) {
dactyl.execute(cmd);
@@ -2201,9 +2204,6 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
let init = services.environment.get(config.idName + "_INIT");
let rcFile = io.getRCFile("~");
if (dactyl.userEval("typeof document", null, "test.js") === "undefined")
jsmodules.__proto__ = XPCSafeJSObjectWrapper(window);
try {
if (dactyl.commandLineOptions.rcFile) {
let filename = dactyl.commandLineOptions.rcFile;