summaryrefslogtreecommitdiff
path: root/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/xul/key.js
diff options
context:
space:
mode:
authorRuben Rodriguez <ruben@gnu.org>2018-09-13 20:39:48 -0400
committerRuben Rodriguez <ruben@gnu.org>2018-09-13 21:02:13 -0400
commitd26b319fd6f98517cc3421f10bf18698b953e4d2 (patch)
treebc70c4e472a2eaf514d411dba5067d530e5bbea9 /data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/xul/key.js
parentc3b304c51a3386ea09527a479a883253ea35243a (diff)
Updated extensions list for v60
Diffstat (limited to 'data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/xul/key.js')
-rw-r--r--data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/xul/key.js43
1 files changed, 0 insertions, 43 deletions
diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/xul/key.js b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/xul/key.js
deleted file mode 100644
index c855fc3..0000000
--- a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/lib/xul/key.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-'use strict';
-
-const NS_XUL = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
-
-exports.XulKey = function XulKey(options) {
- var delegate = {
- onTrack: function (window) {
- if ("chrome://browser/content/browser.xul" != window.location) return;
-
- let doc = window.document;
- function $(id) doc.getElementById(id);
- function xul(type) doc.createElementNS(NS_XUL, type);
-
- var onCmd = function() {
- options.onCommand && options.onCommand();
- };
-
- var keyset = xul("keyset");
-
- // add hotkey
- var key = xul("key");
- key.setAttribute("id", options.id);
- key.setAttribute("key", options.key);
- if (options.modifiers)
- key.setAttribute("modifiers", options.modifiers);
- key.setAttribute("oncommand", "void(0);");
- key.addEventListener("command", onCmd, true);
- ($("mainKeyset") || $("mailKeys")).parentNode.appendChild(keyset).appendChild(key);
-
- // add unloader
- require("unload+").unload(function() {
- key.removeEventListener("command", onCmd, true); // must do for some reason..
- keyset.parentNode.removeChild(keyset);
- }, window);
- },
- onUntrack: function (window) {}
- };
- var winUtils = require("window-utils");
- var tracker = new winUtils.WindowTracker(delegate);
-};