Created
September 11, 2019 17:47
-
-
Save timothycarambat/072f2b5155ed098ad5ff700d10296b4d to your computer and use it in GitHub Desktop.
Show Random URL in iframe on page load. r/programmingrequests for u/XxRewirexX :: https://www.reddit.com/r/programmingrequests/comments/d2kvyb/need_a_random_page_served_from_a_single_url/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en" dir="ltr"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Random Page</title> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
var urlList = [ | |
"https://thebandgo.com", | |
"https://qwilr.com", | |
"https://simpleform.xyz", | |
"https://jumpstory.com", | |
] | |
var node = document.createElement('iframe') | |
node.width = window.innerWidth | |
node.height = window.innerHeight | |
node.src = urlList[ Math.floor(Math.random()*urlList.length)] | |
document.body.appendChild(node) | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment