MTurk A9 Category Validation (Non-Masters)

Assists with Category Validation HITs

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        MTurk A9 Category Validation (Non-Masters)
// @namespace   http://idlewords.net
// @description Assists with Category Validation HITs
// @include     https://www.mturkcontent.com/dynamic/hit*
// @version     0.3
// @require     https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js
// @grant       none
// ==/UserScript==

/*
 Pre-selects "only one" object in image
 - Ctrl + N for "no" (i.e. 0) objects in image
 - Ctrl + M for "more than 1" objects in image
 - Ctrl + O for "only one" object in image
 - Ctrl + B or Ctrl + P for "is blocked or partially out of image"
 - Ctrl + S for Submit
*/

$(document).ready(function() {
	if ($(":contains('If you don\'t know what a')").length) {
		$("input[value='Valid_Object']").prop('checked', true).click();
		$(document).keydown(function(event) {
			if (event.which == 78 && event.ctrlKey) {
				$("input[value='Missing_Object']").prop('checked', true).click();
			} else if (event.which == 79 && event.ctrlKey) {
				$("input[value='Valid_Object']").prop('checked', true).click();
			} else if (event.which == 77 && event.ctrlKey) {
				$("input[value='Multiple_Objects']").prop('checked', true).click();
			} else if ((event.which == 66 || event.which == 80) && event.ctrlKey) {
				$("input[value='Partial_Object']").prop('checked', true);
			} else if (event.which == 83 && event.ctrlKey) {
				$("#submitButton").click();
			}
		});
	}
});