Skip to content

Instantly share code, notes, and snippets.

@SystemJargon
Created June 27, 2022 21:18
Show Gist options
  • Save SystemJargon/90f9755a43f152bcf0a0cab38af2631a to your computer and use it in GitHub Desktop.
Save SystemJargon/90f9755a43f152bcf0a0cab38af2631a to your computer and use it in GitHub Desktop.
Cycle through some urls. Wallboard screen. Uses html and javascript.
<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