mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-01-18 09:28:52 +01:00
Number settings were not stored as numbers but as string when changed.
This commit is contained in:
parent
5575c50a03
commit
2a3abbcec7
@ -44,6 +44,9 @@ browser.storage.local.get().then(function(data){
|
|||||||
|
|
||||||
input.addEventListener("change", function(){
|
input.addEventListener("change", function(){
|
||||||
var value = this.value;
|
var value = this.value;
|
||||||
|
if (this.type === "number"){
|
||||||
|
value = parseFloat(value);
|
||||||
|
}
|
||||||
var obj = {};
|
var obj = {};
|
||||||
obj[storageName] = value;
|
obj[storageName] = value;
|
||||||
browser.storage.local.set(obj);
|
browser.storage.local.set(obj);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user