1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-06-15 01:19:52 +02:00

Number settings were not stored as numbers but as string when changed.

This commit is contained in:
kkapsner 2017-07-18 16:11:47 +02:00
parent 5575c50a03
commit 2a3abbcec7

View File

@ -44,6 +44,9 @@ browser.storage.local.get().then(function(data){
input.addEventListener("change", function(){
var value = this.value;
if (this.type === "number"){
value = parseFloat(value);
}
var obj = {};
obj[storageName] = value;
browser.storage.local.set(obj);