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

panda script

目前为 2015-06-17 提交的版本。查看 最新版本

// ==UserScript==
// @name           ikarma's Sequential PandA zings and mylikes + add your own for mturk
// @author         ikarma, kadauchi
// @include        https://www.mturk.com/mturk/previewandaccept*
// @grant          GM_addStyle
// @description:en panda script
// @namespace      https://greasyfork.org/users/
// @version        0.0.2
// @namespace      https://greasyfork.org/users/9054
// @description    panda script
// @require        http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
// ==/UserScript==

//===[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: Are these receipts the same?
    ,'https://www.mturk.com/mturk/previewandaccept?groupId=30B721SJLR5BYYBNQJ0CVKJESN00OC' // Zing: Are these receipts the same? (Ibotta Qual)
    ,'https://www.mturk.com/mturk/previewandaccept?groupId=3EM4DVSA8U8J6KF08Q5EM8I2NYE308' // Venue Quality: Are These Locations The Same?
    ,'https://www.mturk.com/mturk/previewandaccept?groupId=3D8O2NKTAGFJD90I499E0D26RON13W' // Venue Quality: Does this Event contain mature adult-oriented content? (WARNING: may contain adult content)
];



if ((urlsToLoad.indexOf(window.location.href) > -1 ) && (!($('input[name="userCaptchaResponse"]').length > 0))) { // Checks if url is above and if not captcha.
    FireTimer ();
}


if ($('input[name="userCaptchaResponse"]').length > 0) { // Do something on captcha such as an alert.
    alert("Captcha Alert!"); //alert
}


//--- 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];
}