Skip to content

Commit f253ff5

Browse files
committed
Try to fix no redirect when coming from link
1 parent 2972603 commit f253ff5

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

404.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
Adapted from: https://stackoverflow.com/a/73263779
1111
-->
1212
<script>
13-
window.onload = () => {
13+
window.addEventListener('load',
14+
function() {
1415
currentpath = location.pathname.replace(/\/+$/, '');
1516
if (currentpath == "growbikenet") {
1617
location.replace(window.location.hostname+"GrowBikeNet");
@@ -22,8 +23,8 @@
2223
location.replace(window.location.hostname+"LoopBikeNet");
2324
} else if (currentpath == "bikenetlib") {
2425
location.replace(window.location.hostname+"BikeNetLib");
25-
}
26-
};
26+
}
27+
}, false);
2728
</script>
2829

2930
<style type="text/css" media="screen">

0 commit comments

Comments
 (0)