Skip to content

Commit

Permalink
added uri decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
quantumbagel committed Mar 1, 2024
1 parent c86e27e commit cb01420
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ const pages = document.querySelectorAll("[data-page]");
window.onhashchange = function () {
console.log(location.hash, pages[0].dataset);
for (let i = 0; i < pages.length; i++) {
if (location.hash.slice(1) === pages[i].dataset.page) {
if (decodeURI(location.hash.slice(1)) === pages[i].dataset.page) {
pages[i].classList.add("active");
navigationLinks[i].classList.add("active");
window.scrollTo(0, 0);
Expand Down

0 comments on commit cb01420

Please sign in to comment.