summaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-08-09 21:07:11 -0400
committerGitHub <noreply@github.com>2020-08-09 21:07:11 -0400
commit2a86d6609210a586ec32c48a99904c9b64744d04 (patch)
treee87b3a7abb84c1d1dbb51d27de100288d00df155 /ext/bg/js
parent9f8f83508e6d8e469b8cd89c1fb3ec85601401d8 (diff)
DOM + DocumentUtil merge (#727)
* Add DOM functions to DocumentUtil * Use DocumentUtil instead of DOM * Remove DOM * Move document-util.js into mixed
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/search.js4
-rw-r--r--ext/bg/js/settings/conditions-ui.js6
2 files changed, 5 insertions, 5 deletions
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js
index 7cad2671..0a0699a9 100644
--- a/ext/bg/js/search.js
+++ b/ext/bg/js/search.js
@@ -17,8 +17,8 @@
/* global
* ClipboardMonitor
- * DOM
* Display
+ * DocumentUtil
* api
* wanakana
*/
@@ -104,7 +104,7 @@ class DisplaySearch extends Display {
}
onKeyDown(e) {
- const key = DOM.getKeyFromEvent(e);
+ const key = DocumentUtil.getKeyFromEvent(e);
const ignoreKeys = this._onKeyDownIgnoreKeys;
const activeModifierMap = new Map([
diff --git a/ext/bg/js/settings/conditions-ui.js b/ext/bg/js/settings/conditions-ui.js
index 031689a7..98b3d432 100644
--- a/ext/bg/js/settings/conditions-ui.js
+++ b/ext/bg/js/settings/conditions-ui.js
@@ -16,7 +16,7 @@
*/
/* global
- * DOM
+ * DocumentUtil
* conditionsNormalizeOptionValue
*/
@@ -323,7 +323,7 @@ ConditionsUI.Condition = class Condition {
const pressedKeyIndices = new Set();
const onKeyDown = ({originalEvent}) => {
- const pressedKeyEventName = DOM.getKeyFromEvent(originalEvent);
+ const pressedKeyEventName = DocumentUtil.getKeyFromEvent(originalEvent);
if (pressedKeyEventName === 'Escape' || pressedKeyEventName === 'Backspace') {
pressedKeyIndices.clear();
inputInner.val('');
@@ -331,7 +331,7 @@ ConditionsUI.Condition = class Condition {
return;
}
- const pressedModifiers = DOM.getActiveModifiers(originalEvent);
+ const pressedModifiers = DocumentUtil.getActiveModifiers(originalEvent);
// https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/metaKey
// https://askubuntu.com/questions/567731/why-is-shift-alt-being-mapped-to-meta
// It works with mouse events on some platforms, so try to determine if metaKey is pressed