autonomnom - Efficiency for IWS - Answer questions about a photo

This script autofocuses the HIT and gives keyboard inputs for all functions with just four clustered keys - 1, 2, w and e.

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

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

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         autonomnom - Efficiency for IWS - Answer questions about a photo
// @namespace    mkrobert
// @version      1.04
// @description  This script autofocuses the HIT and gives keyboard inputs for all functions with just four clustered keys - 1, 2, w and e.
// @author       mkrobert, clickhappier
// @include      https://www.masseurfinder.com/s/aws_turk/*
// @icon 	 http://mturkgrind.com/data/avatars/l/8/8874.jpg?1445404860
// @grant        none
// ==/UserScript==
// https://github.com/mkrobert
runScript();
function runScript()
{
  $('#b0').focus(); //saves you from needing to click on the background at the start
  window.onkeydown = function (e)
  {
    if (e.keyCode === 87) //press w  for "0 people"
    $('#b0').click();
    if (e.keyCode === 49) { //press 1 for YES or "1 person"
      $('#yesButton').click();
      $('#b1').click();
    }
    if (e.keyCode === 50) { //press 2 for NO or "2 or more people"
      $('#noButton').click();
      $('#b2').click();
    }
    if (e.keyCode === 69) //press e for "Yes - Submit"
    $('#submitButton').click();
  }
}