Skip to content

Instantly share code, notes, and snippets.

@Squids47
Created April 18, 2020 02:25
Show Gist options
  • Save Squids47/be74d6d81f8b39e8b848decec2c0ade7 to your computer and use it in GitHub Desktop.
Save Squids47/be74d6d81f8b39e8b848decec2c0ade7 to your computer and use it in GitHub Desktop.
Random // source https://jsbin.com/kanuzog
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<style>
body{
text-align: center;
background-color:rgb(46,243,250);
}
a:link {
color: red;
<script src="https://code.jquery.com/jquery-git.js"></script>
}
a:visited {
color: rgb(234, 245, 86);
}
a:hover {
background-color: rgb(42, 52, 247);
}
a:active {
background-color: rgb(50, 223, 235);
}
a:focus {
background-color: rgb(62, 20, 201);
}
.button{
background-color:rgb(62,130,255);
margin-top:200px;
}
</style>
<title>Random</title>
</head>
<body>
<script>
<!--
/*
Random link button- By JavaScript Kit (http://javascriptkit.com)
Over 300+ free scripts!
This credit MUST stay intact for use
*/
//specify random links below. You can have as many as you want
var randomlinks=new Array()
randomlinks[0]="https://drawastickman.com/"
randomlinks[1]="https://clickspeedtest.com/"
randomlinks[2]="https://deeeep.io/"
randomlinks[3]="https://www.youtube.com/watch?v=npjF032TDDQ"
randomlinks[4]="https://tenor.com/view/cereal-milk-guy-bowl-gif-5810127"
randomlinks[5]="https://www.myinstants.com/instant/reeeeeeeeeeeeeeeeeee/"
randomlinks[6]="https://www.youtube.com/watch?v=SiMHTK15Pik"
randomlinks[7]="https://www.youtube.com/watch?v=5W-saVR4bAo"
randomlinks[8]="https://www.youtube.com/watch?v=tJp_3-VZZjI&t=32s"
randomlinks[9]="https://tenor.com/view/mylife-gif-9246530"
randomlinks[10]="https://www.youtube.com/watch?v=ZciWmGc9v64"
randomlinks[11]="https://www.youtube.com/watch?v=TkYXfRAXZPM&feature=youtu.be"
function randomlink(){
window.location=randomlinks[Math.floor(Math.random()*randomlinks.length)]
}
//-->
</script>
<form method="post">
<p><input type="button" name="B1" value="Click For Random Website" onclick="randomlink()"></p> </form>
<!--Uncomment below to use a regular text link instead
<a href="javascript:randomlink()">Random Link</a>
-->
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment