Fix graphs tab not saving

This commit is contained in:
JonnyWong16 2020-10-10 09:48:55 -07:00
parent 88a5db05b7
commit 1e807af2d4
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
2 changed files with 8 additions and 7 deletions

View file

@ -591,16 +591,18 @@ function PopupCenter(url, title, w, h) {
function setLocalStorage(key, value, path) {
var key_path = key;
if (path !== false) {
key = key + '_' + window.location.pathname;
key_path = key_path + '_' + window.location.pathname;
}
localStorage.setItem(key, value);
localStorage.setItem(key_path, value);
}
function getLocalStorage(key, default_value, path) {
var key_path = key;
if (path !== false) {
key = key + '_' + window.location.pathname;
key_path = key_path + '_' + window.location.pathname;
}
var value = localStorage.getItem(key);
var value = localStorage.getItem(key_path);
if (value !== null) {
return value
} else if (default_value !== undefined) {