diff options
Diffstat (limited to 'src/webview/lib/Userscript.js')
-rw-r--r-- | src/webview/lib/Userscript.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/webview/lib/Userscript.js b/src/webview/lib/Userscript.js index 2043d9fff..bed2b1ff8 100644 --- a/src/webview/lib/Userscript.js +++ b/src/webview/lib/Userscript.js | |||
@@ -28,7 +28,7 @@ export default class Userscript { | |||
28 | * | 28 | * |
29 | * @param {*} settings | 29 | * @param {*} settings |
30 | */ | 30 | */ |
31 | // eslint-disable-next-line | 31 | // eslint-disable-next-line camelcase |
32 | internal_setSettings(settings) { | 32 | internal_setSettings(settings) { |
33 | // This is needed to get a clean JS object from the settings itself to provide better accessibility | 33 | // This is needed to get a clean JS object from the settings itself to provide better accessibility |
34 | // Otherwise this will be a mobX instance | 34 | // Otherwise this will be a mobX instance |
@@ -95,9 +95,7 @@ export default class Userscript { | |||
95 | * @param {*} value | 95 | * @param {*} value |
96 | */ | 96 | */ |
97 | set(key, value) { | 97 | set(key, value) { |
98 | window.localStorage.setItem( | 98 | window.localStorage.setItem(`ferdi-user-${key}`, JSON.stringify(value)); |
99 | `ferdi-user-${key}`, JSON.stringify(value), | ||
100 | ); | ||
101 | } | 99 | } |
102 | 100 | ||
103 | /** | 101 | /** |
@@ -107,9 +105,7 @@ export default class Userscript { | |||
107 | * @return Value of the key | 105 | * @return Value of the key |
108 | */ | 106 | */ |
109 | get(key) { | 107 | get(key) { |
110 | return JSON.parse(window.localStorage.getItem( | 108 | return JSON.parse(window.localStorage.getItem(`ferdi-user-${key}`)); |
111 | `ferdi-user-${key}`, | ||
112 | )); | ||
113 | } | 109 | } |
114 | 110 | ||
115 | /** | 111 | /** |