Skip to content

Commit

Permalink
feat: redirect when accessed without slash (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red authored Dec 19, 2022
1 parent ed9c857 commit 2f3f593
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
if (setting === 'dark' || (prefersDark && setting !== 'light'))
document.documentElement.classList.toggle('dark', true)
})()

;(function () {
if (!location.pathname.endsWith('/'))
location.pathname += '/'
})()
</script>
<script type="module" src="/main.ts"></script>
</body>
Expand Down

0 comments on commit 2f3f593

Please sign in to comment.