mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-01-03 10:31:54 +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(){
|
||||
var value = this.value;
|
||||
if (this.type === "number"){
|
||||
value = parseFloat(value);
|
||||
}
|
||||
var obj = {};
|
||||
obj[storageName] = value;
|
||||
browser.storage.local.set(obj);
|
||||
|
Loading…
x
Reference in New Issue
Block a user