Return All

Adds a Return All link to the Mturk Queue page.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name       Return All
// @version    1.2
// @description  Adds a Return All link to the Mturk Queue page.
// @author     Cristo
// @grant                GM_getValue
// @grant                GM_setValue
// @include https://www.mturk.com/mturk/myhits
// @include https://www.mturk.com/mturk/return*
// @copyright  2012+, You
// @namespace https://greasyfork.org/users/1973
// ==/UserScript==

    if (document.getElementsByClassName("capsulelink").length > 0) {
        var hand = document.getElementById("collapseall");
        var cap = document.getElementsByClassName("capsulelink")[1].innerHTML;
        var linkPart = cap.split('"')[1];
        var link = linkPart.replace("amp;", "");

        var bar = document.createElement("font");
        bar.innerHTML = "&nbsp&nbsp"+"|";
        bar.style.color = "#9ab8ef";
        hand.parentNode.appendChild(bar);

        var but = document.createElement("a");
        but.innerHTML="&nbsp&nbsp"+"Return All";
        but.setAttribute("href", "#");
        but.setAttribute("class", "footer_links");
        but.setAttribute("id", "returnbut");
        bar.parentNode.appendChild(but);

        but.addEventListener( "click", cas, false);
    }
    function cas(){
        GM_setValue("toreturn", "true");
        window.location.href = "https://www.mturk.com" + link;
    }
    if ((GM_getValue("toreturn") == "true")&&(document.getElementsByClassName("capsulelink").length > 0)){
        window.location.href = "https://www.mturk.com" + link;
    } else {
        GM_setValue("toreturn", "false");
    }