From 9c1012ad3a731b015b8a70b58828fbcd0acb7db0 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sun, 9 Oct 2016 16:31:23 +0100 Subject: Extend key translation to include Escape. Here, these map to escape: translate x translate --- content_scripts/mode_key_handler.coffee | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'content_scripts/mode_key_handler.coffee') diff --git a/content_scripts/mode_key_handler.coffee b/content_scripts/mode_key_handler.coffee index 7904d801..9f8206fb 100644 --- a/content_scripts/mode_key_handler.coffee +++ b/content_scripts/mode_key_handler.coffee @@ -34,11 +34,7 @@ class KeyHandlerMode extends Mode blur: (event) => @alwaysContinueBubbling => @keydownEvents = {} if event.target == window @keyTranslationRegistry = {} - chrome.storage.local.get "keyTranslationRegistry", (obj) => - @keyTranslationRegistry = obj.keyTranslationRegistry - chrome.storage.onChanged.addListener (changes, area) => - if area == "local" and changes.keyTranslationRegistry?.newValue? - @keyTranslationRegistry = changes.keyTranslationRegistry.newValue + Utils.monitorChromeStorage "keyTranslationRegistry", (value) => @keyTranslationRegistry = value onKeydown: (event) -> keyChar = KeyboardUtils.getKeyCharString event -- cgit v1.2.3