diff --git a/README.md b/README.md index 24b36ab..1aa3b74 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # spdMerlin ## v4.4.20 -### Updated on 2026-Apr-15 +### Updated on 2026-Jun-24 ## About spdMerlin is an internet speedtest and monitoring tool for AsusWRT Merlin with charts for daily, weekly and monthly summaries. It tracks download/upload bandwidth as well as latency, jitter and packet loss. diff --git a/spdmerlin.sh b/spdmerlin.sh index 1c7eb18..bc98fb4 100644 --- a/spdmerlin.sh +++ b/spdmerlin.sh @@ -14,7 +14,7 @@ ## Forked from https://github.com/jackyaz/spdMerlin ## ## ## ############################################################## -# Last Modified: 2026-Apr-15 +# Last Modified: 2026-Jun-24 #------------------------------------------------------------- ############## Shellcheck directives ############# @@ -39,7 +39,7 @@ readonly SCRIPT_NAME="spdMerlin" readonly SCRIPT_NAME_LOWER="$(echo "$SCRIPT_NAME" | tr 'A-Z' 'a-z')" readonly SCRIPT_VERSION="v4.4.20" -readonly SCRIPT_VERSTAG="26041500" +readonly SCRIPT_VERSTAG="26062400" SCRIPT_BRANCH="develop" SCRIPT_REPO="https://raw.githubusercontent.com/AMTM-OSR/$SCRIPT_NAME/$SCRIPT_BRANCH" readonly SCRIPT_DIR="/jffs/addons/$SCRIPT_NAME_LOWER.d" diff --git a/spdstats_www.asp b/spdstats_www.asp index 0da58e4..a6467bd 100644 --- a/spdstats_www.asp +++ b/spdstats_www.asp @@ -30,9 +30,9 @@ p{font-weight:bolder;}thead.collapsible-jquery{color:white;padding:0;width:100%; diff --git a/spdstats_www.js b/spdstats_www.js index 219690e..59bbb0e 100644 --- a/spdstats_www.js +++ b/spdstats_www.js @@ -1,5 +1,5 @@ /**----------------------------**/ -/** Last Modified: 2025-Oct-14 **/ +/** Last Modified: 2026-Jun-24 **/ /**----------------------------**/ var daysofweek = ['Mon','Tues','Wed','Thurs','Fri','Sat','Sun']; @@ -814,6 +814,35 @@ function getTimeFormat(value,format){ return timeformat; } +/**----------------------------------------------------------------** + ** Compatibility layer for the latest AsusWRT6 routers, such as + ** the GT-BE19000AI, where the previous global 'cookie' helper + ** functions defined in the 'state.js' file are now removed in + ** favour of using the "window.localStorage" property. + **----------------------------------------------------------------**/ +if (typeof window.cookie === "undefined" || + typeof window.cookie.get !== "function" || + typeof window.cookie.set !== "function") +{ + window.cookie = { + get: function (key) { + return window.localStorage.getItem(key); + }, + + /** In the previous 'cookie' function a 3rd argument was given for 'days' **/ + /** Here, we ignore the value because there is no expiration date anymore **/ + set: function (key, value, days) { + window.localStorage.setItem(key, String(value)); + }, + + unset: function (key) { + window.localStorage.removeItem(key); + } + }; + + console.log("Installed localStorage compatibility for cookie API."); +} + function GetCookie(cookiename,returntype){ if(cookie.get('spd_'+cookiename) != null){ return cookie.get('spd_'+cookiename);