ikarma's Sequential PandA zings and mylikes + add your own for mturk

panda script

当前为 2015-02-11 提交的版本,查看 最新版本

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

You will need to install an extension such as Tampermonkey to install this script.

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name    	ikarma's Sequential PandA zings and mylikes + add your own for mturk
// @include 	https://www.mturk.com/mturk/previewandaccept*
// @grant   	GM_addStyle
// @description:en panda script

// @namespace https://greasyfork.org/users/
// @version 0.0.1.20150211181820
// @namespace https://greasyfork.org/users/9054
// @description panda script
// ==/UserScript==
/*- The @grant directive is needed to work around a major design
	change introduced in GM 1.0.
	It restores the sandbox.
*/
 
//===[Settings]===\\
mCoinSound = new Audio("http://www.denhaku.com/r_box/sr16/sr16perc/histicks.wav"); //==[This is the path to the mp3 used for the alert]==\\//===[Settings]===\\                                                          //==[Just change the url to use whatever sound you want]==\\


var urlsToLoad  = [
	   'https://www.mturk.com/mturk/previewandaccept?groupId=3EGCY5R6XY0PS57S4R2H1KZW7LSAYC' // mylikes
          ,'https://www.mturk.com/mturk/previewandaccept?groupId=30B721SJLR5BYYBNQJ0CVKJEQOZ0OB' // zing
];
 
/*---  insure script fires after load:
*/
/* window.addEventListener ("load", FireTimer, false);
if (document.readyState == "complete") */ {
	FireTimer ();

}
//--- Catch new pages loaded by WELL BEHAVED ajax.
window.addEventListener ("hashchange", FireTimer,  false);
 
function FireTimer () {
	if (document.getElementsByName("autoAcceptEnabled")[0]){
	setTimeout(function() { location.reload(true); }, 1500); // 1000 == 1 seconds
mCoinSound.play();
  	} else {
	setTimeout(function() { GotoNextURL(); }, 1500); // 1000 == 1 seconds
                
	}
}
    
function GotoNextURL () {
	var numUrls 	= urlsToLoad.length;
	var urlIdx  	= urlsToLoad.indexOf (location.href);
	urlIdx++;
	if (urlIdx >= numUrls)
    	urlIdx = 0;
 
	location.href   = urlsToLoad[urlIdx];
}