fix length option default and adjective past

This commit is contained in:
wareya committed 2017-12-12 00:27:06 -05:00
1 parent d8246c59f8
commit 56540be754
2 files changed
+5 -1

No files matched your search

+1
View File
@@ -272,6 +272,7 @@ rules.push({type: "stdrule", dec_end:"", con_end:"さ", dec_tag:"stem-adj-base",
rules.push({type: "stdrule", dec_end:"", con_end:"た", dec_tag:"stem-ren-less", con_tag:"stem-past", detail:"past"}); rules.push({type: "stdrule", dec_end:"", con_end:"た", dec_tag:"stem-ren-less", con_tag:"stem-past", detail:"past"});
rules.push({type: "stdrule", dec_end:"", con_end:"だ", dec_tag:"stem-ren-less-v", con_tag:"stem-past", detail:"past"}); rules.push({type: "stdrule", dec_end:"", con_end:"だ", dec_tag:"stem-ren-less-v", con_tag:"stem-past", detail:"past"});
//rules.push({type: "stdrule", dec_end:"", con_end:"て", dec_tag:"stem-ren", con_tag:"stem-te", detail:"(te form)"}); // unusual but real but don't necessarily want it yet //rules.push({type: "stdrule", dec_end:"", con_end:"て", dec_tag:"stem-ren", con_tag:"stem-te", detail:"(te form)"}); // unusual but real but don't necessarily want it yet
rules.push({type: "stdrule", dec_end:"", con_end:"った", dec_tag:"stem-ka", con_tag:"stem-past", detail:"past"});
// we want some te forms to only apply to verbs, not adjectives // we want some te forms to only apply to verbs, not adjectives
// FIXME: need a way to not break ~ないでください, ~ないでいく, etc // FIXME: need a way to not break ~ないでください, ~ないでいく, etc
+4 -1
View File
@@ -36,11 +36,14 @@ async function restoreOptions()
function setOptions() function setOptions()
{ {
let length = parseInt(document.querySelector("#length").value, 10);
if(!length) // NaN is falsy
length = 25;
browser.storage.local.set( browser.storage.local.set(
{ {
enabled: document.querySelector("#enabled").checked, enabled: document.querySelector("#enabled").checked,
compact: document.querySelector("#compact").checked, compact: document.querySelector("#compact").checked,
length: parseInt(document.querySelector("#length").value), length: length,
}); });
} }