[.01 EyeEm Inc]Flag images - Select the tags that are not relevant to this image.

1-6 to click checkboxes, hide instructions

目前为 2015-07-17 提交的版本,查看 最新版本

// ==UserScript==
// @name        [.01 EyeEm Inc]Flag images - Select the tags that are not relevant to this image. 
// @author robert
// @namespace   https://greasyfork.org/en/users/13168-robert
// @description 1-6 to click checkboxes, hide instructions
// @include     https://www.mturkcontent.com/dynamic/hit*
// @version     1
// @grant       none
// @require  http://code.jquery.com/jquery-2.1.0.min.js
// ==/UserScript==

// Based heavily on Kadauchi's Nova Compare two products
// https://greasyfork.org/en/scripts/10843-nova-compare-two-products/code

// true if you want to hide the instructions
var hideInstructions=true;

if (hideInstructions)
{ 
    $(".panel-body").hide();
    $(".panel-heading").click
    (
        function() 
        {    
            $(".panel-body").toggle();
        }
    );
}
if ( $("p:contains('Unselect all the tags that are not appropriate for the given image')").length )
{
    $("input[id='checkbox4']").focus();
    window.onkeydown = function(e)
    {
      if (e.keyCode === 97 || e.keyCode === 49) //1 
        $("input[id='checkbox4']").click();
      if (e.keyCode === 98 || e.keyCode === 50) //2
        $("input[id='checkbox5']").click();
      if (e.keyCode === 99 || e.keyCode === 51) //3 
          $("input[id='checkbox6']").click();
        if (e.keyCode === 100 || e.keyCode === 52) //4
          $("input[id='checkbox1']").click();
      if (e.keyCode === 101 || e.keyCode === 53) //5 
          $("input[id='checkbox2']").click();
        if (e.keyCode === 102 || e.keyCode === 54) //6
          $("input[id='checkbox3']").click();
      // Submit
      if (e.keyCode === 13 ) //enter
        $("input[id='submitButton']" ).click();
    };
}