// ==UserScript==
// @name nobliscv faces
// @namespace http://tampermonkey.net/
// @version 0.1
// @description press 1 for next -- once its submittable 1 submits; 3 undoes last mark; a marks 'No Faces'; cursor to crosshair;
// @author JQKILL
// @include *s3.amazonaws.com/*
// @require http://code.jquery.com/jquery-2.1.0.min.js
// @grant GM_log
// ==/UserScript==
$(document).ready(function() {
if ($("#instructions_boundingboxes").css('display') != 'none') { //sanity check -- should only work on specific HIT
$("body").css('cursor', 'crosshair');
$("button[id='submitbutton']").css('color', 'white');
$("button[id='submitbutton']").css('background-color', 'red');
$("div[id='button_div']").css('position', 'absolute');
$("div[id='button_div']").css('top', '0');
document.onkeydown = function (event) {
if (event.keyCode == 49) { // 1 for 'next' until submit is active, then 'submit'
if($('#nextbutton').css('display') == 'none'){
$("#submitbutton").click();
}else{
$("#nextbutton").click();
}
}
if (event.keyCode == 51) { // '3' for 'Undo'
$("#undobutton").click();
}
if (event.keyCode == 65) { // 'a' for 'No Faces'
$("#nofacesbutton").click();
}
};
}
});