// ==UserScript== // @name Image moderation speeder-upper // @namespace mobiusevalon.tibbius.com // @version 0.2 // @description Lots of optimizations to speed up image moderation HITs // @author Mobius Evalon // @match https://www.mturkcontent.com/dynamic/hit* // @require https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js // @grant none // @downloadURL none // ==/UserScript== $(document).ready(function() { var matches = /What is (\d*)\+(\d*)\?/i.exec($("label").last().text()); if(matches !== null) // vessel turk { $("input:radio[value=no]").prop('checked',true); $("input:text[name=captcha]").val((matches[matches.length-1]*1)+(matches[matches.length-2]*1)); $("#submitButton").focus(); $(document).keydown(function(event) {if(event.which === 13) $("#submitButton").click();}) } if($("input:radio[name=shouldBan]").length) // mixerbox { $('.panel-heading').first().append( $('') .attr("id","collapse-instructions") .text(" [Show/Hide]") .css("cursor","pointer") .click(function() { var $p = $(".panel-body").first(); if($p.css("display") === "none") $p.show(); else $p.hide(); }) ); $(".panel-body").first().hide(); $("input:radio[name=shouldBan][value=0]").prop('checked',true); $("#submitButton").focus(); $(document).keydown(function(event) { switch(event.which) { case 13: $("#submitButton").click(); break; case 97: case 35: case 49: // numpad numlock on, numpad numlock off, horizontal num keys respectively $("input:radio[name=shouldBan][value=1]").prop('checked',true); break; case 98: case 40: case 50: $("input:radio[name=shouldBan][value=-2]").prop('checked',true); break; case 99: case 34: case 51: $("input:radio[name=shouldBan][value=0]").prop('checked',true); break; } }) } });