polish
This commit is contained in:
1 parent
d46263cdf6
commit
45c384c182
5 files changed
+20
-1
No files matched your search
@@ -850,6 +850,10 @@ browser.runtime.onMessage.addListener((req, sender, sendResponse) =>
|
|||||||
{
|
{
|
||||||
toggle_enabled();
|
toggle_enabled();
|
||||||
}
|
}
|
||||||
|
else if (req.type == "fixicon")
|
||||||
|
{
|
||||||
|
fixicon();
|
||||||
|
}
|
||||||
else if (req.type == "gimmetext")
|
else if (req.type == "gimmetext")
|
||||||
{
|
{
|
||||||
clipboard_hook(sender.tab);
|
clipboard_hook(sender.tab);
|
||||||
|
|||||||
@@ -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.
|
||||||
@@ -42,5 +42,11 @@
|
|||||||
},
|
},
|
||||||
"default_title": "Nazeka (disabled)",
|
"default_title": "Nazeka (disabled)",
|
||||||
"default_area": "navbar"
|
"default_area": "navbar"
|
||||||
|
},
|
||||||
|
|
||||||
|
"icons": {
|
||||||
|
"16": "img/enabled16.png",
|
||||||
|
"32": "img/enabled32.png",
|
||||||
|
"512": "img/enabled512.png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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="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="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>
|
<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>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+6
-1
@@ -51,6 +51,11 @@ async function restoreOptions()
|
|||||||
restoreListeners();
|
restoreListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function fixicon()
|
||||||
|
{
|
||||||
|
browser.runtime.sendMessage({type:"fixicon"});
|
||||||
|
}
|
||||||
|
|
||||||
function setOptions()
|
function setOptions()
|
||||||
{
|
{
|
||||||
let length = parseInt(document.querySelector("#length").value, 10);
|
let length = parseInt(document.querySelector("#length").value, 10);
|
||||||
@@ -65,7 +70,7 @@ function setOptions()
|
|||||||
fixedwidthpositioning: document.querySelector("#fixedwidthpositioning").checked,
|
fixedwidthpositioning: document.querySelector("#fixedwidthpositioning").checked,
|
||||||
superborder: document.querySelector("#superborder").checked,
|
superborder: document.querySelector("#superborder").checked,
|
||||||
showoriginal: document.querySelector("#showoriginal").checked,
|
showoriginal: document.querySelector("#showoriginal").checked,
|
||||||
});
|
}).then(()=>{fixicon();},()=>{});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (document.readyState == "complete")
|
if (document.readyState == "complete")
|
||||||
|
|||||||
Reference in new issue
Block a user