summaryrefslogtreecommitdiff
path: root/ext/fg
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg')
-rw-r--r--ext/fg/footer.html21
-rw-r--r--ext/fg/header.html21
-rw-r--r--ext/fg/js/client.js2
3 files changed, 43 insertions, 1 deletions
diff --git a/ext/fg/footer.html b/ext/fg/footer.html
new file mode 100644
index 00000000..3f37d8bd
--- /dev/null
+++ b/ext/fg/footer.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8">
+ <title></title>
+ <link rel="stylesheet" href="{{root}}/css/popup.css">
+ </head>
+ <body>
+ <div class="dictionary">
+ <a href="javascript:setActiveDict('edict');">単</a><a href="javascript:setActiveDict('enamdict')">名</a><a href="javascript:setActiveDict('kanjidic');">漢</a>
+ </div>
+
+ {{#each defs}}
+ <div class="definition">
+ {{> term.html}}
+ </div>
+ {{/each}}
+
+ <script src="{{root}}/js/popup.js"></script>
+ </body>
+</html>
diff --git a/ext/fg/header.html b/ext/fg/header.html
new file mode 100644
index 00000000..3f37d8bd
--- /dev/null
+++ b/ext/fg/header.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8">
+ <title></title>
+ <link rel="stylesheet" href="{{root}}/css/popup.css">
+ </head>
+ <body>
+ <div class="dictionary">
+ <a href="javascript:setActiveDict('edict');">単</a><a href="javascript:setActiveDict('enamdict')">名</a><a href="javascript:setActiveDict('kanjidic');">漢</a>
+ </div>
+
+ {{#each defs}}
+ <div class="definition">
+ {{> term.html}}
+ </div>
+ {{/each}}
+
+ <script src="{{root}}/js/popup.js"></script>
+ </body>
+</html>
diff --git a/ext/fg/js/client.js b/ext/fg/js/client.js
index 4df19594..aae051fa 100644
--- a/ext/fg/js/client.js
+++ b/ext/fg/js/client.js
@@ -119,7 +119,7 @@ class Client {
this.hidePopup();
} else {
const params = {defs: results, root: chrome.extension.getURL('fg'), activeDict: this.activeDict};
- renderText(params, 'defs.html', (html) => this.showPopup(range, html, popupQuery, length));
+ renderText(params, 'term-list.html', (html) => this.showPopup(range, html, popupQuery, length));
}
});
}