kateniemantinga
Posts: 4
Joined: Tue Jan 05, 2016 11:52 am

Auto start rotating tabs

Tue Jan 05, 2016 12:10 pm

I would like to set up my Pi to automatically (on start up) launch a web browser (midori or other) and cycle through a list of pre-configured webpages ie. tab rotate every 30 seconds or so.

I am a complete newbie to Raspberrys and have spent several days already getting my pi to connect to the internet, update its packages, install chromium only to discovery that the "tab rotater app" available in chrome does not work with chromium.
The tab rotater app was not my ideal solution as it would require some set up but it could be a workable interim solution.

So now I dont know what to do, would appreciate any help please.
Many thanks!

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4257
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: Auto start rotating tabs

Tue Jan 05, 2016 12:27 pm


kateniemantinga
Posts: 4
Joined: Tue Jan 05, 2016 11:52 am

Re: Auto start rotating tabs

Tue Jan 05, 2016 12:34 pm

Thanks rurwin. That link got me a down the path to where I am now.
However it does not allow for you to configure multi webpages and then there is still the rotating part.

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4257
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: Auto start rotating tabs

Tue Jan 05, 2016 1:05 pm

You can do that with Javascript, including external pages if you need to with <iframe>s.

kateniemantinga
Posts: 4
Joined: Tue Jan 05, 2016 11:52 am

Re: Auto start rotating tabs

Tue Jan 05, 2016 1:49 pm

The webpages I want to display are quite big already, so multiple iframes on one page will not work.
Would like to cycle through the webpages.

kateniemantinga
Posts: 4
Joined: Tue Jan 05, 2016 11:52 am

Re: Auto start rotating tabs

Wed Jan 06, 2016 1:45 pm

So I did some investigating and finally got the iframes thing to work with a little javascript file.
However it works perfectly on my laptop but not on my pi (using midori and chromium)
Any suggestions?
This is the script...


<html>
<head>
<title>Kates Page</title>
</head>
<body onload="showUrl(0)" class="app-chrome">
<iframe id="rotator" src="http://www.google.com" width=1900 height=1000></iframe>

<script>
// start when the page is loaded
window.onload = function() {

var urls = [
"https://ourlocal.org.za/#/dashboard/file/eagle.json",

"https://ourlocal.org.za/#/dashboard/db/ ... uments-fgm",
"https://ourlocal.org.za/#/dashboard/db/ ... uments-l25",
"https://ourlocal.org.za/#/dashboard/db/ ... uments-ovh",
"https://ourlocal.org.za/#/dashboard/db/ ... st-hergst1",
"https://ourlocal.org.za/#/dashboard/db/ ... st-maugst1"
];

var index = 1;
var el = document.getElementById("rotator");

setTimeout(function rotate() {

if ( index === urls.length ) {
index = 0;
}

el.src = urls[index];
index = index + 1;

// continue rotating iframes
setTimeout(rotate, 5000);

}, 5000); // 5000ms = 5s
};
</script>
</body>
</html>

sebastianmurillo
Posts: 1
Joined: Wed Jan 03, 2018 7:27 pm

Re: Auto start rotating tabs

Wed Jan 03, 2018 7:31 pm

Hi kateniemantinga,

I been wanting to do this exact same thing for a while! Did it work on your Pi?

I would appreciate very much your answer as I am waiting to know this for sure to buy a couple of Pi's and I haven't been able to find any similar projects for confirmation.

Thanks for the help!

echobob
Posts: 1
Joined: Wed May 02, 2018 7:45 am

Re: Auto start rotating tabs

Wed May 02, 2018 7:52 am

Hi there, it is quite simple to let tabs auto rotate, no coding required. Just install the revolver extension. this extension works with chromium. just click the three dots in the right upper corner of your browser. Navigate to more tools and click extensions and on the link get more extensions and search for the revolver tabs extension. https://chrome.google.com/webstore/deta ... hhijacnbda. It works perfectly together with Chromium.

Return to “Graphics, sound and multimedia”