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.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 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();
  }
}