From 71e0e9cbc3a491617f5472c3a516260bbc178d24 Mon Sep 17 00:00:00 2001 From: wareya Date: Wed, 13 Dec 2017 04:38:41 -0500 Subject: [PATCH] polish, full dict license attribution, touchmove test --- background-script.js | 6 ++++-- manifest.json | 2 +- options.html | 17 +++++++++-------- texthook.js | 7 +++++-- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/background-script.js b/background-script.js index 8690d17..0083b6a 100644 --- a/background-script.js +++ b/background-script.js @@ -786,7 +786,8 @@ async function update_icon(enabled) "16": "img/enabled16.png", "32": "img/enabled32.png", "512": "img/enabled512.png" - }},) + }},); + browser.browserAction.setTitle({title:"Nazeka (enabled)"}); } else { @@ -794,7 +795,8 @@ async function update_icon(enabled) "16": "img/action16.png", "32": "img/action32.png", "512": "img/action512.png" - }},) + }},); + browser.browserAction.setTitle({title:"Nazeka (disabled)"}); } } diff --git a/manifest.json b/manifest.json index bb80576..5ab4086 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "nazeka", - "version": "0.0pre1", + "version": "0.0pre2", "author": "Wareya", "homepage_url": "https://github.com/wareya/nazeka", "description": "A rikai replacement.", diff --git a/options.html b/options.html index dd4c9c3..11e8f53 100644 --- a/options.html +++ b/options.html @@ -10,14 +10,15 @@
- - - - - - - -

This extension uses JMdict, which is licensed under the CC BY-SA 3.0 license. This extension is otherwise licensed under the Apache License, version 2.0.

+
+
+
+
+
+
+
+

This extension uses JMdict, which is Copyright (C) 2017 The Electronic Dictionary Research and Development Group and licensed under the CC BY-SA 3.0 license.

+

This extension is otherwise licensed under the Apache License, version 2.0.

diff --git a/texthook.js b/texthook.js index 15ad5eb..bf94791 100644 --- a/texthook.js +++ b/texthook.js @@ -639,7 +639,7 @@ let throttle = 8; let seach_x_offset = -3; -window.addEventListener("mousemove", (event)=> +function update(event) { if(!settings.enabled) return; @@ -796,6 +796,9 @@ window.addEventListener("mousemove", (event)=> // console.log(offset); lookup_cancel(); } -}); +} + +window.addEventListener("mousemove", update); +window.addEventListener("touchmove", update);