mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-06 13:11:15 -07:00
Save graph config to local storage instead of server
This commit is contained in:
parent
be0144bbe1
commit
0e0fb2e2b8
4 changed files with 128 additions and 165 deletions
|
@ -520,8 +520,14 @@ function PopupCenter(url, title, w, h) {
|
|||
function setLocalStorage(key, value) {
|
||||
localStorage.setItem(key, value);
|
||||
}
|
||||
function getLocalStorage(key) {
|
||||
return localStorage.getItem(key);
|
||||
function getLocalStorage(key, default_value) {
|
||||
var value = localStorage.getItem(key);
|
||||
if (value !== null) {
|
||||
return value
|
||||
} else if (default_value) {
|
||||
setLocalStorage(key, default_value);
|
||||
return default_value
|
||||
}
|
||||
}
|
||||
|
||||
if (!getLocalStorage('Tautulli_ClientId')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue