Get internet IP setting + session cache fix

This commit is contained in:
Jokob-sk
2023-01-14 10:03:56 +11:00
parent 121b5cdf32
commit 3c13f82d61
6 changed files with 51 additions and 43 deletions

View File

@@ -766,7 +766,7 @@ function main () {
initializeCalendar();
// Read Cookies
devicesList = getCookie('devicesList');
devicesList = getCache('devicesList');
if (devicesList != '') {
devicesList = JSON.parse (devicesList);
} else {
@@ -923,22 +923,22 @@ function writeDropdownHtml(dropdownId, dropdownHtmlContent)
HTMLelement.innerHTML += dropdownHtmlContent;
}
// -----------------------------------------------------------------------------
function getCache(key)
{
// check cache
if(sessionStorage.getItem(key))
{
return sessionStorage.getItem(key);
} else
{
return "";
}
}
// -----------------------------------------------------------------------------
function setCache(key, data)
{
sessionStorage.setItem(key, data);
}
// function getCache(key)
// {
// // check cache
// if(sessionStorage.getItem(key))
// {
// return sessionStorage.getItem(key);
// } else
// {
// return "";
// }
// }
// // -----------------------------------------------------------------------------
// function setCache(key, data)
// {
// sessionStorage.setItem(key, data);
// }
// -----------------------------------------------------------------------------
function initializeComboSkipRepeated () {