Skip to content

Commit

Permalink
update hash
Browse files Browse the repository at this point in the history
  • Loading branch information
iguannalin committed Nov 22, 2023
1 parent 1b2f4d8 commit 594690a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ window.addEventListener("load", () => {
const selected = e.target.innerText.split(" ")[0];
if (document.getElementById(selected)) {
let subelem = document.getElementById(selected);
location.hash = selected;
switchView(subelem, true);
}
}
Expand Down Expand Up @@ -167,4 +168,6 @@ window.addEventListener("load", () => {
dot.innerText = '.';
document.body.appendChild(dot);
});

if (location.hash) onSelectProject({target:{innerText:location.hash.split("#")[1]}});
});

0 comments on commit 594690a

Please sign in to comment.