Created
August 10, 2016 12:38
-
-
Save radioslave/62c5472bc94a99b2bd2a389907779c64 to your computer and use it in GitHub Desktop.
Chromium RPi Raspbian - URL & Rotation Timings
This file contains 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> | |
<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