Created
August 8, 2016 02:16
-
-
Save cr4m3r/15b297430edb5d53f8f874a89000734b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Carelinx Faces | |
// @version 2.0 | |
// @author slothbear | |
// @icon http://i.imgur.com/yptTSAh.gif | |
// @include https://www.mturkcontent.com/dynamic/* | |
// @require https://code.jquery.com/jquery-2.1.4.min.js | |
// ==/UserScript== | |
// autoselects one adult, face visible, and good quality | |
// | |
// 'enter' submits | |
// '2' selects more that one person in photo | |
// '3' selects no people/children/pets/cars/whatever... | |
// 'b' selects blurry | |
// 'r' selects rotated | |
// 'c' selects face is cut off | |
// 'tab' will focus on the different groups of answers (code is janky but whatever) | |
// | |
// I didn't put in the rest of the options, because I wasn't using them too much... | |
if ($("p:contains(Answer the questions about the profile picture as they appear.)").length){ | |
$( document ).ready(function(){ | |
$( '#hide1' ).css('display', 'table-row'); | |
$( '#hide2' ).css('display', 'table-row'); | |
$( 'input[value=oneadult]' ).focus().click().delay(500); | |
$( 'input[value=faceclearlyvisible]' ).click().delay(500); | |
$( 'input[value=good]' ).click(); | |
var tabCount = 0; | |
document.onkeydown = function(e) { | |
switch(e.which){ | |
case 66: //b for blurry | |
$('input[value=blurry]').focus().click(); | |
break; | |
case 82: //r for rotated | |
$('input[value=crooked]').focus().click(); | |
break; | |
case 67: //c for cut off | |
$('input[value=cutoff]').focus().click(); | |
break; | |
case 50: //2 for more than one person | |
$('input[value=severaladults]').click(); | |
break; | |
case 51: //3 for None of the above | |
$('input[value=noneabove]').click(); | |
break; | |
case 13: // enter | |
$("input[id='submitbutton']").click(); | |
break; | |
case 9: // tab | |
e.preventDefault(); | |
if (tabCount === 0) { | |
$('input[value=faceclearlyvisible]').focus(); | |
tabCount++; | |
} else if (tabCount === 1) { | |
$('input[value=good]').focus(); | |
tabCount++; | |
} else { | |
$('input[value=oneadult]').focus(); | |
tabCount = 0; | |
} | |
} | |
}; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment