From 218db0771fae0754a50cadc1891a042112b58699 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sat, 25 Mar 2017 16:45:43 -0700 Subject: cleanup, firefox scrolling --- ext/fg/js/display-frame.js | 8 ++++---- ext/fg/js/driver.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'ext/fg') diff --git a/ext/fg/js/display-frame.js b/ext/fg/js/display-frame.js index d930d325..41c2fb53 100644 --- a/ext/fg/js/display-frame.js +++ b/ext/fg/js/display-frame.js @@ -58,20 +58,20 @@ window.displayFrame = new class extends Display { onMessage(e) { const handlers = new class { - api_showTermDefs({definitions, options, context}) { + showTermDefs({definitions, options, context}) { this.showTermDefs(definitions, options, context); } - api_showKanjiDefs({definitions, options, context}) { + showKanjiDefs({definitions, options, context}) { this.showKanjiDefs(definitions, options, context); } - api_showOrphaned() { + showOrphaned() { this.showOrphaned(); } }; - const {action, params} = e.originalEvent.data, method = handlers[`api_${action}`]; + const {action, params} = e.originalEvent.data, method = handlers[action]; if (typeof(method) === 'function') { method.call(this, params); } diff --git a/ext/fg/js/driver.js b/ext/fg/js/driver.js index 7a56dd9c..036dc2d8 100644 --- a/ext/fg/js/driver.js +++ b/ext/fg/js/driver.js @@ -117,7 +117,7 @@ window.driver = new class { onBgMessage({action, params}, sender, callback) { const handlers = new class { - api_optionsSet(options) { + optionsSet(options) { this.options = options; if (!this.options.enable) { this.searchClear(); @@ -125,7 +125,7 @@ window.driver = new class { } }; - const method = handlers[`api_${action}`]; + const method = handlers[action]; if (typeof(method) === 'function') { method.call(this, params); } -- cgit v1.2.3