From 45c384c1825be992f2ae780a7031e34b80c3b9a1 Mon Sep 17 00:00:00 2001 From: wareya Date: Tue, 12 Dec 2017 23:58:21 -0500 Subject: [PATCH] polish --- background-script.js | 4 ++++ dictionary license.txt | 3 +++ manifest.json | 6 ++++++ options.html | 1 + options.js | 7 ++++++- 5 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 dictionary license.txt diff --git a/background-script.js b/background-script.js index 00822c5..ba16050 100644 --- a/background-script.js +++ b/background-script.js @@ -850,6 +850,10 @@ browser.runtime.onMessage.addListener((req, sender, sendResponse) => { toggle_enabled(); } + else if (req.type == "fixicon") + { + fixicon(); + } else if (req.type == "gimmetext") { clipboard_hook(sender.tab); diff --git a/dictionary license.txt b/dictionary license.txt new file mode 100644 index 0000000..93c21f2 --- /dev/null +++ b/dictionary license.txt @@ -0,0 +1,3 @@ +JMdict is licensed under the CC-BY-SA 3.0 license. https://creativecommons.org/licenses/by-sa/3.0/ + +It has been converted from XML to JSON for compactness and ease of use. diff --git a/manifest.json b/manifest.json index fccd5d5..7a1647f 100644 --- a/manifest.json +++ b/manifest.json @@ -42,5 +42,11 @@ }, "default_title": "Nazeka (disabled)", "default_area": "navbar" + }, + + "icons": { + "16": "img/enabled16.png", + "32": "img/enabled32.png", + "512": "img/enabled512.png" } } diff --git a/options.html b/options.html index fd4bc1c..dd4c9c3 100644 --- a/options.html +++ b/options.html @@ -17,6 +17,7 @@ +

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.

diff --git a/options.js b/options.js index 6c450be..fa9aa45 100644 --- a/options.js +++ b/options.js @@ -51,6 +51,11 @@ async function restoreOptions() restoreListeners(); } +function fixicon() +{ + browser.runtime.sendMessage({type:"fixicon"}); +} + function setOptions() { let length = parseInt(document.querySelector("#length").value, 10); @@ -65,7 +70,7 @@ function setOptions() fixedwidthpositioning: document.querySelector("#fixedwidthpositioning").checked, superborder: document.querySelector("#superborder").checked, showoriginal: document.querySelector("#showoriginal").checked, - }); + }).then(()=>{fixicon();},()=>{}); } if (document.readyState == "complete")