Skip to content

Commit 27e15ad

Browse files
authored
Update script.js
Fix thisPage()
1 parent c46279b commit 27e15ad

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

js/script.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3482,6 +3482,10 @@ Options -Indexes
34823482
const thisPage = function() {
34833483
const url = globalThis.location.href;
34843484
const parts = url.split('/');
3485+
if (parts[parts.length - 1] === '') {
3486+
return "index";
3487+
}
3488+
34853489
return parts[parts.length - 1].split(".html")[0];
34863490
}
34873491

0 commit comments

Comments
 (0)