1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-06 08:45:46 +01:00

Fix registration of commands on FF36.

This commit is contained in:
Kris Maglione
2011-02-28 20:23:46 -05:00
parent ea6c7cc800
commit 0c4b50265f

View File

@@ -6,17 +6,19 @@
// given in the LICENSE.txt file included with this file. // given in the LICENSE.txt file included with this file.
"use strict"; "use strict";
function isDactyl(frame) /^resource:\/\/dactyl\S+( -> resource:\/\/dactyl(?!-content\/eval.js)\S+)?$/.test(frame.filename);
try { try {
Components.utils.import("resource://dactyl/bootstrap.jsm"); Components.utils.import("resource://dactyl/bootstrap.jsm");
defineModule("commands", { defineModule("commands", {
exports: ["ArgType", "Command", "Commands", "CommandOption", "Ex", "commands"], exports: ["ArgType", "Command", "Commands", "CommandOption", "Ex", "commands"],
require: ["contexts"], require: ["contexts", "util"],
use: ["config", "options", "services", "template", "util"] use: ["config", "options", "services", "template"]
}, this); }, 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. * A structure representing the options available for a command.
* *