diff options
author | Ruben Rodriguez <ruben@gnu.org> | 2015-11-28 15:24:36 -0600 |
---|---|---|
committer | Ruben Rodriguez <ruben@gnu.org> | 2015-11-28 16:27:06 -0600 |
commit | e4a3586a14996bbece3b26c9e3b7704ea6af8615 (patch) | |
tree | 499bdd16b3a90c30b01e4b47a5882d13b4800f50 /data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/devtools/gcli.js | |
parent | 4dbc2fae927bb02ef243c87938e638af9afee8fa (diff) |
LibreJS upgraded to 6.0.10
Diffstat (limited to 'data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/devtools/gcli.js')
-rw-r--r-- | data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/devtools/gcli.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/devtools/gcli.js b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/devtools/gcli.js new file mode 100644 index 0000000..e1bb17f --- /dev/null +++ b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/devtools/gcli.js @@ -0,0 +1,23 @@ +'use strict'; + +const { Cu } = require('chrome'); +const { when: unload } = require('unload'); + +try { + // Starting with FF 23, gcli.jsm moved to another location + Cu.import("resource://gre/modules/devtools/gcli.jsm"); +} catch(e) { + try { + Cu.import("resource:///modules/devtools/gcli.jsm"); + } catch(e) { + console.error("Unable to load gcli.jsm"); + } +} + +function addCommand(cmd) { + let name = cmd.name; + gcli.addCommand(cmd); + unload(gcli.removeCommand.bind(gcli, name)); +} +exports.addCommand = addCommand; +exports.removeCommand = gcli.removeCommand; |