Created
June 27, 2022 21:18
-
-
Save SystemJargon/90f9755a43f152bcf0a0cab38af2631a to your computer and use it in GitHub Desktop.
Cycle through some urls. Wallboard screen. Uses html and javascript.
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
<html> | |
<body> | |
<script type="text/javascript"> | |
var urls = [ | |
"https://eyes.nasa.gov/apps/earth/#/", | |
"https://threatmap.fortiguard.com/", | |
"https://earth.nullschool.net", | |
] | |
var UPDATE_FREQ = 20*1000; | |
var current_url = 0; | |
var iframe = document.createElement("iframe"); | |
iframe.width = "100%"; | |
iframe.height = "100%"; | |
function update_url() { | |
current_url = (current_url + 1) % (urls.length); | |
iframe.src = urls[current_url]; | |
console.log("set url to " + urls[current_url]); | |
setTimeout(update_url, UPDATE_FREQ); | |
} | |
console.log("starting url cycling"); | |
document.body.appendChild(iframe); | |
setTimeout(update_url, 0); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment