summaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
authorMarin Ivanov <[email protected]>2024-08-20 15:36:06 +0300
committerMarin Ivanov <[email protected]>2024-08-20 15:36:06 +0300
commitda5fd96e5e9364a6ae26a9a2ffe5dad294d93ec7 (patch)
tree5f01e0d1cffe61500f2cd23108e5ea44705aaa2c /app.js
parent0c24aba5dd6b7804ba63d596e3ae692fccb68e88 (diff)
fix hash handling
Diffstat (limited to 'app.js')
-rw-r--r--app.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app.js b/app.js
index 8dec438..aa1fcdc 100644
--- a/app.js
+++ b/app.js
@@ -97,8 +97,8 @@ const routes = {
p("The requested page is not available.")
),
};
-const onchange = () => {
- doc.querySelectorAll('nav a').forEach(x => x.$cls((location.href===x.href)?"active":""));
+const onchange = (h) => {
+ doc.querySelectorAll('nav a').forEach(x => x.$cls(x.attr("href")===h?"active":""));
loading(isLoading);
};