Skip to content

Commit

Permalink
Add event listener for refresh.
Browse files Browse the repository at this point in the history
  • Loading branch information
xhagrg committed Sep 28, 2023
1 parent 0d8f5ce commit 9a45998
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ <h1>{{appTitle}}</h1>
document.body.innerHTML =
'Unfortunately, your browser is not currently supported.<br />Recommended browsers: Edge, Firefox, Safari, Chrome';
}

document.addEventListener('click', function (event) {
if (event.target.tagName == 'A') {
window.location.replace(event.target.href)
}
});
</script>

<script type='module' src='./scripts/main.tsx'></script>
Expand Down

0 comments on commit 9a45998

Please sign in to comment.