diff --git a/public/trivabble.js b/public/trivabble.js index 2057c09..65b8580 100644 --- a/public/trivabble.js +++ b/public/trivabble.js @@ -138,7 +138,13 @@ (type === "number") || (type === "object") || (type === "string")) { - localStorage.setItem("trivabble" + key, value); + if (Object.prototype.hasOwnProperty.call(Conf, key) && (Conf[key] === value)) { + if (Object.prototype.hasOwnProperty.call(localStorage, "trivabble" + key)) { + delete localStorage["trivabble" + key]; + } + } else { + localStorage.setItem("trivabble" + key, value); + } } else { console.error("Unsupported type"); }