This commit is contained in:
wareya committed 2017-12-12 23:58:21 -05:00
1 parent d46263cdf6
commit 45c384c182
5 files changed
+20 -1

No files matched your search

+4
View File
@@ -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);
+3
View File
@@ -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.
+6
View File
@@ -42,5 +42,11 @@
},
"default_title": "Nazeka (disabled)",
"default_area": "navbar"
},
"icons": {
"16": "img/enabled16.png",
"32": "img/enabled32.png",
"512": "img/enabled512.png"
}
}
+1
View File
@@ -17,6 +17,7 @@
<input id="fixedwidth" type="checkbox" name=fixedwidth class=panel-formElements-item/><label for=fixedwidth class=panel-formElements-item>Fixed width</label>
<input id="fixedwidthpositioning" type="checkbox" name=fixedwidthpositioning class=panel-formElements-item/><label for=fixedwidthpositioning class=panel-formElements-item>Position as though fixed width</label>
<input id="length" type="number" min="6" max="100" value="25" name=length class=panel-formElements-item/><label for=length class=panel-formElements-item>Search length (characters) (default 25, sane values are from 25 to 50)</label>
<p>This extension uses JMdict, which is licensed under the <a href="https://creativecommons.org/licenses/by-sa/3.0/">CC BY-SA 3.0</a> license. This extension is otherwise licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, version 2.0</a>.</p>
</div>
</form>
</div>
+6 -1
View File
@@ -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")