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

+4 -1
View File
@@ -36,11 +36,14 @@ async function restoreOptions()
function setOptions()
{
let length = parseInt(document.querySelector("#length").value, 10);
if(!length) // NaN is falsy
length = 25;
browser.storage.local.set(
{
enabled: document.querySelector("#enabled").checked,
compact: document.querySelector("#compact").checked,
length: parseInt(document.querySelector("#length").value),
length: length,
});
}