aboutsummaryrefslogtreecommitdiff
path: root/ext/fg
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-08-14 19:55:04 -0700
committerAlex Yatskov <alex@foosoft.net>2017-08-14 19:55:04 -0700
commit82863cd86156d48b9f18dc10a560bedb82641862 (patch)
treec31e760ab960d5b4c3def5a313e8cf0fb9277612 /ext/fg
parent8b50dfe1e9a8be7b8d2a7c69b25bc04babfc1c0c (diff)
renaming files
Diffstat (limited to 'ext/fg')
-rw-r--r--ext/fg/css/client.css2
-rw-r--r--ext/fg/float.html (renamed from ext/fg/frame.html)10
-rw-r--r--ext/fg/js/float.js (renamed from ext/fg/js/display-frame.js)8
-rw-r--r--ext/fg/js/popup.js4
4 files changed, 13 insertions, 11 deletions
diff --git a/ext/fg/css/client.css b/ext/fg/css/client.css
index 9f566480..b5b1f6bd 100644
--- a/ext/fg/css/client.css
+++ b/ext/fg/css/client.css
@@ -17,7 +17,7 @@
*/
-iframe#yomichan-popup {
+iframe#yomichan-float {
all: initial;
background-color: #fff;
border: 1px solid #999;
diff --git a/ext/fg/frame.html b/ext/fg/float.html
index dda3ef06..a3b66c92 100644
--- a/ext/fg/frame.html
+++ b/ext/fg/float.html
@@ -5,7 +5,7 @@
<title></title>
<link rel="stylesheet" href="/mixed/lib/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="/mixed/lib/bootstrap/css/bootstrap-theme.min.css">
- <link rel="stylesheet" href="/mixed/css/frame.css">
+ <link rel="stylesheet" href="/mixed/css/display.css">
<style type="text/css">
.entry, .note {
padding-left: 10px;
@@ -30,14 +30,14 @@
</div>
</div>
+ <script src="/mixed/lib/jquery.min.js"></script>
+ <script src="/mixed/lib/wanakana.min.js"></script>
+
<script src="/fg/js/api.js"></script>
- <script src="/fg/js/dictionary.js"></script>
<script src="/fg/js/util.js"></script>
<script src="/mixed/js/audio.js"></script>
<script src="/mixed/js/display.js"></script>
- <script src="/mixed/lib/jquery.min.js"></script>
- <script src="/mixed/lib/wanakana.min.js"></script>
- <script src="/fg/js/display-frame.js"></script>
+ <script src="/fg/js/float.js"></script>
</body>
</html>
diff --git a/ext/fg/js/display-frame.js b/ext/fg/js/float.js
index e3f3e692..59293239 100644
--- a/ext/fg/js/display-frame.js
+++ b/ext/fg/js/float.js
@@ -17,10 +17,10 @@
*/
-window.yomichan_frame = new class extends Display {
+class DisplayFloat extends Display {
constructor() {
super($('#spinner'), $('#definitions'));
- $(window).on('message', this.onMessage.bind(this));
+ $(window).on('message', e => this.onMessage(e));
}
onError(error) {
@@ -83,4 +83,6 @@ window.yomichan_frame = new class extends Display {
super.onKeyDown(e);
}
}
-};
+}
+
+window.yomichan_display = new DisplayFloat();
diff --git a/ext/fg/js/popup.js b/ext/fg/js/popup.js
index ba3289d4..8e61169a 100644
--- a/ext/fg/js/popup.js
+++ b/ext/fg/js/popup.js
@@ -20,10 +20,10 @@
class Popup {
constructor() {
this.container = document.createElement('iframe');
- this.container.id = 'yomichan-popup';
+ this.container.id = 'yomichan-float';
this.container.addEventListener('mousedown', e => e.stopPropagation());
this.container.addEventListener('scroll', e => e.stopPropagation());
- this.container.setAttribute('src', chrome.extension.getURL('/fg/frame.html'));
+ this.container.setAttribute('src', chrome.extension.getURL('/fg/float.html'));
this.container.style.width = '0px';
this.container.style.height = '0px';
this.injected = null;