Last active
December 17, 2015 12:39
-
-
Save serby/5611617 to your computer and use it in GitHub Desktop.
Cycle all tabs in chrome for 1 minute.
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
| var i = 0; | |
| if (typeof cycleInt !== 'undefined') clearInterval(cycleInt); | |
| function interval() { | |
| chrome.tabs.getAllInWindow(onAllTabs) | |
| } | |
| function onAllTabs(tabs) { | |
| if (i >= tabs.length) i = 0; | |
| chrome.tabs.update(tabs[i++].id, { active: true }) | |
| } | |
| cycleInt = setInterval(interval, 60000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment