From 266f28883ae7f0d87cc93efe25c07dccc243a145 Mon Sep 17 00:00:00 2001 From: Tim Turner Date: Sun, 22 Jan 2017 15:54:37 -0500 Subject: [PATCH] Prefix localstorage keys with "Radarr" Updates #285 --- src/UI/Config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/UI/Config.js b/src/UI/Config.js index c2a64db58..fc3fc3828 100644 --- a/src/UI/Config.js +++ b/src/UI/Config.js @@ -2,6 +2,8 @@ var $ = require('jquery'); var vent = require('./vent'); module.exports = { + ConfigNamespace : 'Radarr', + Events : { ConfigUpdatedEvent : 'ConfigUpdatedEvent' }, @@ -16,6 +18,7 @@ module.exports = { }, getValueJson : function (key, defaultValue) { + key = this.ConfigNamespace + key; defaultValue = defaultValue || {}; var storeValue = window.localStorage.getItem(key); @@ -34,6 +37,7 @@ module.exports = { }, getValue : function(key, defaultValue) { + key = this.ConfigNamespace + key; var storeValue = window.localStorage.getItem(key); if (!storeValue) { @@ -48,6 +52,7 @@ module.exports = { }, setValue : function(key, value) { + key = this.ConfigNamespace + key; console.log('Config: [{0}] => [{1}]'.format(key, value)); if (this.getValue(key) === value.toString()) {