Skip to content

Commit

Permalink
merge add random redirect
Browse files Browse the repository at this point in the history
add random redirect
  • Loading branch information
bucketfish authored Aug 31, 2024
2 parents e3f5be8 + 6150441 commit 292ae9e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions about.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ <h2>custom embeds using redirect links</h2>
<ul>
<li><p>previous page: <code>https://webring.bucketfish.me/redirect.html?to=prev&amp;name=<strong>your name</strong></code></p></li>
<li><p>next page: <code>https://webring.bucketfish.me/redirect.html?to=next&amp;name=<strong>your name</strong></code></p></li>
<li><p>random page: <code>https://webring.bucketfish.me/redirect.html?to=random&amp;name=<strong>your name</strong></code></p></li>
<li><p>webring website: <code>https://webring.bucketfish.me</code></p></li>
</ul>

Expand Down
5 changes: 5 additions & 0 deletions redirect.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
window.location.replace(sites[nextSiteIndex].url);
}

else if (dir == "random"){
const randomSiteIndex = Math.floor(Math.random() * sites.length);
window.location.replace(sites[randomSiteIndex].url);
}

});


Expand Down

0 comments on commit 292ae9e

Please sign in to comment.