Yarolds Exchange Cycler

Cycles between the exchange pages

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name            Yarolds Exchange Cycler
// @namespace       Yarolds
// @description     Cycles between the exchange pages
// @include         http://swle.yarold.eu/main.php?s=-1
// @include         http://swle.yarold.eu/history.php#tab1
// @include         http://swle.yarold.eu/dynasty_ex.php?s=3
// @include         http://swle.yarold.eu/history.php#tab2
// @version         1.0.9
// @copyright       2012+, DemonicJ & the crazy crew from The Mob
// @homepage	    http://swle.yarold.eu
// ==/UserScript==

// Update the following array with your own urls, these should match the @include lines above
var cycleUrls = new Array('http://swle.yarold.eu/main.php?s=-1','http://swle.yarold.eu/history.php#tab1','http://swle.yarold.eu/dynasty_ex.php?s=3','http://swle.yarold.eu/history.php#tab2');
var cycleDuration = 15000;  // 15 seconds, change to suit your needs
var redirectUrl;

for (var i = 0; i < cycleUrls.length; i++)
{
	if (location.href == cycleUrls[i])
	{
		redirectUrl = (i + 1 < cycleUrls.length) ? cycleUrls[i + 1] : redirectUrl = cycleUrls[0];
		setTimeout(urlCycle,cycleDuration);
	}
}

function urlCycle()
{
	location.href = redirectUrl;
}