Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# uiDivStats - WebUI for Diversion statistics

## v4.0.17
### Updated on 2026-Apr-24
### Updated on 2026-Jun-24

## About
A graphical representation of domain blocking performed by Diversion.
Expand Down
4 changes: 2 additions & 2 deletions uiDivStats.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
## Forked from https://github.com/jackyaz/uiDivStats ##
## ##
###################################################################
# Last Modified: 2026-Apr-24
# Last Modified: 2026-Jun-24
#------------------------------------------------------------------

################# Shellcheck directives ###############
Expand All @@ -36,7 +36,7 @@
### Start of script variables ###
readonly SCRIPT_NAME="uiDivStats"
readonly SCRIPT_VERSION="v4.0.17"
readonly SCRIPT_VERSTAG="26042400"
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.d"
Expand Down
8 changes: 4 additions & 4 deletions uidivstats_www.asp

Large diffs are not rendered by default.

31 changes: 30 additions & 1 deletion uidivstats_www.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**----------------------------**/
/** Last Modified: 2026-Jan-18 **/
/** Last Modified: 2026-Jun-24 **/
/**----------------------------**/

var maxNoChartsBlocked = 6;
Expand Down Expand Up @@ -600,6 +600,35 @@ function LogarithmicFormatter(tickValue,index,ticks)
}
};

/**----------------------------------------------------------------**
** 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('uidivstats_'+cookiename) !== null)
Expand Down