summaryrefslogtreecommitdiff
path: root/ext/fg/js/display-frame.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-03-25 18:19:38 -0700
committerAlex Yatskov <alex@foosoft.net>2017-03-25 18:19:38 -0700
commit37321e8d52849b0824132e2339760e96308abbb6 (patch)
tree1e6b986768e65d07337bc31ae1d8c2641f60d9f4 /ext/fg/js/display-frame.js
parent2c164fb65f286e2852c7e5eb5e7098c5a4fe6f1a (diff)
parent063f3d4dbf8c896f4f7b022cfae6e2b907769251 (diff)
Merge branch 'dev'
Diffstat (limited to 'ext/fg/js/display-frame.js')
-rw-r--r--ext/fg/js/display-frame.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/ext/fg/js/display-frame.js b/ext/fg/js/display-frame.js
index 8f15b1bc..41c2fb53 100644
--- a/ext/fg/js/display-frame.js
+++ b/ext/fg/js/display-frame.js
@@ -47,6 +47,10 @@ window.displayFrame = new class extends Display {
}
}
+ clearSearch() {
+ window.parent.postMessage('popupClose', '*');
+ }
+
showOrphaned() {
$('#content').hide();
$('#orphan').show();
@@ -54,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);
}