diff options
author | Kris Maglione <maglione.k@gmail.com> | 2011-02-28 20:23:46 -0500 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2011-02-28 20:23:46 -0500 |
commit | 0c4b50265fca55c6944e36377fee43276b19c0e8 (patch) | |
tree | 1e213184839127e865310019bc6d23c991f2171e /common/modules/commands.jsm | |
parent | ea6c7cc800bf279be326a46eb5886d4c1bba91a9 (diff) | |
download | pentadactyl-0c4b50265fca55c6944e36377fee43276b19c0e8.tar.gz |
Fix registration of commands on FF36.
Diffstat (limited to 'common/modules/commands.jsm')
-rw-r--r-- | common/modules/commands.jsm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/common/modules/commands.jsm b/common/modules/commands.jsm index 5c9543e6..719cb746 100644 --- a/common/modules/commands.jsm +++ b/common/modules/commands.jsm @@ -6,17 +6,19 @@ // given in the LICENSE.txt file included with this file. "use strict"; -function isDactyl(frame) /^resource:\/\/dactyl\S+( -> resource:\/\/dactyl(?!-content\/eval.js)\S+)?$/.test(frame.filename); - try { Components.utils.import("resource://dactyl/bootstrap.jsm"); defineModule("commands", { exports: ["ArgType", "Command", "Commands", "CommandOption", "Ex", "commands"], - require: ["contexts"], - use: ["config", "options", "services", "template", "util"] + require: ["contexts", "util"], + use: ["config", "options", "services", "template"] }, this); +let base = util.regexp.escape(Components.stack.filename.replace(/[^\/]+$/, "")); +let re = RegExp("^(resource://dactyl|" + base + ")\\S+( -> resource://dactyl(?!-content/eval.js)\\S+)?$"); +let isDactyl = function isDactyl(frame) re.test(frame.filename); + /** * A structure representing the options available for a command. * |