A9 - Category Validation

Does stuff.

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

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

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

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

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

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

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         A9 - Category Validation
// @namespace    http://kadauchi.com/
// @version      1.0.4
// @description  Does stuff.
// @author       Kadauchi
// @icon         http://kadauchi.com/avatar4.jpg
// @include      /^https://(www|s3)\.(mturkcontent|amazonaws)\.com/
// @grant        GM_log
// @require      https://code.jquery.com/jquery-3.1.0.min.js
// @hitname      Category Validation (WARNING: This HIT may contain adult content. Worker discretion is advised.)
// @hitsave      https://s3.amazonaws.com/mturk_bulk/hits/213127554/gNnUF_IpktVYa17QxCSO9A.html
// ==/UserScript==

_category_validation();

function _category_validation () {
  if ($('u:contains(What we are looking for will change after every HIT!)').length) {

	// Keybinds
	$(document).keydown(function (e) {
	  switch (e.which) {
		case 96: // Numpad 0
		  $('#noItem').click();
		  break;
		case 97: // Numpad 1
		  $('#oneItem, #noPersonal, #noCatalog, #noOverlay, #noSliceDice').click();
		  $('input[name="objectView"][value="No"]').click();
		  break;
		case 98: // Numpad 2
		  $('#multipleItem, #noPersonal, #noCatalog, #noOverlay, #noSliceDice').click();
		  $('input[name="objectView"][value="No"]').click();
		  break;
		case 101: // Numpad 5
		  $('#yesSliceDice').click();
		  break;
		case 102: // Numpad 6
		  $('#yesOverlay').click();
		  break;
		case 103: // Numpad 7
		  $('#yesPersonal').click();
		  break;
		case 105: // Numpad 9
		  $('#yesCatalog').click();
		  break;
		case 13: // Enter
		  $('#submitButton').click();
		  break;
	  }
	});
	console.log('activated');
  }
}


/*
Jharkan @MTC
http://www.mturkcrowd.com/posts/349481/

Numpad0::
send {tab}{space}
return

Numpad1::
send {tab}{down}
sleep, 100
send {tab 2}{right}{tab}{right}{tab}{right}
return

Numpad2::
send {tab}{down 2}
sleep, 100
send {tab 2}
send {right}{tab}{right}{tab}{right}
return

Numpad6::
send {left}
return

Numpad7::
send, {shift down}{tab}{tab}{shift up}
send {left}
return

Numpad9::
send, {shift down}{tab}{shift up}
send {left}
return

^9::
suspend
return

^3::
ExitApp
*/