superfish

Assists with Superfish hits on Amazon Mechanical Turk

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name superfish
// @namespace whatever
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
// @include https://www.mturkcontent.com/dynamic*
// @description Assists with Superfish hits on Amazon Mechanical Turk
// @version 1.3
// @grant none
// ==/UserScript==

$('img').each(function(){
    $(this).click(function(){
        $(this).next().next().click();
    });
}); 

if (!this.GM_getValue || (this.GM_getValue.toString && this.GM_getValue.toString().indexOf("not supported")>-1)) {
    this.GM_getValue=function (key,def) {
        return localStorage[key] || def;
        };
    this.GM_setValue=function (key,value) {
        return localStorage[key]=value;
        };
    this.GM_deleteValue = function(key) {
        return localStorage.removeItem(key);
    };
}

if (GM_getValue("superfish")){
    $('input').each(function(){
        if ($(this).attr("type") == "checkbox" && $(this).attr("id") != "assignmentId" && $(this).attr("value") != "none" && $(this).attr("id") != "submitButton")
            $(this).click();
    });
}

document.onkeydown = showkeycode;
function showkeycode(evt){
    var keycode = evt.keyCode;
    switch (keycode) {
        case 13: //enter
            document.getElementById("mturk_form").submit();
            break;
        case 192: //`
            $('input').each(function(){
                if ($(this).attr("type") == "checkbox" && $(this).attr("id") != "assignmentId" && $(this).attr("value") != "none" && $(this).attr("id") != "submitButton")
                    $(this).click();
            });
            if (GM_getValue("superfish"))
                GM_deleteValue("superfish");
            else
            	GM_setValue("superfish",1);
            break;
    }}