Skip to content

Instantly share code, notes, and snippets.

@radioslave
Created August 10, 2016 12:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save radioslave/62c5472bc94a99b2bd2a389907779c64 to your computer and use it in GitHub Desktop.
Save radioslave/62c5472bc94a99b2bd2a389907779c64 to your computer and use it in GitHub Desktop.
Chromium RPi Raspbian - URL & Rotation Timings
<html>
<head>
<title>Test Layout</title>
<style type="text/css">
body, html
{
margin: 0; padding: 0; height: 100%; overflow: hidden;
}
#content
{
position:absolute; left: 0; right: 0; bottom: 0; top: 0px;
}
</style>
</head>
<body>
<div id="content">
<iframe id="rotate" name="rotate" width="100%" height="100%" frameborder="0" src="http://bbc.co.uk/iplayer"></iframe>
</div>
<script type="text/javascript">
var urls = ['http://bbc.co.uk/news', 'http://www.bbc.co.uk/sport/0/', 'https://www.danpurdy.co.uk/'];
var pos = 0;
next();
setInterval(next, 5000); // every 5 seconds
function next()
{
if(pos == urls.length) pos = 0; // reset the counter
document.rotate.location.href = urls[pos];
pos++;
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment