Safe Cats

Safe Hotkeys for Categorization Masters HITs (Single Layer)

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name        Safe Cats
// @description Safe Hotkeys for Categorization Masters HITs (Single Layer)
// @author      DCI
// @version     1.3
// @include     https://www.mturkcontent.com/dynamic/*
// @include     https://s3.amazonaws.com/*
// @require     http://code.jquery.com/jquery-latest.min.js
// @namespace DCI
// ==/UserScript==

var cat = document.getElementsByTagName("title")[0];
var cat2 = cat.innerHTML
var title = "Categorization";

if ( cat2 === title ){document.addEventListener( "keydown", press, false);}

function press(i) {

if ( i.keyCode == 65 || i.keyCode == 97 ) { //A or npad 1 - Choice 1
$('.choice-button.btn.ng-binding.choice').eq(0).click();
if ($('.choice-button.btn.ng-binding.choice').length > 0) { 
setTimeout(function(){$('#submit_button').click();},0750)}}

if ( i.keyCode == 83 || i.keyCode == 98 ) { //S or npad 2 - Choice 2
$('.choice-button.btn.ng-binding.choice').eq(1).click();
if ($('.choice-button.btn.ng-binding.choice').length > 0) { 
setTimeout(function(){$('#submit_button').click();},0750)}}

if ( i.keyCode == 68 || i.keyCode == 99 ) { //D or npad 3 - Choice 3
$('.choice-button.btn.ng-binding.choice').eq(2).click();
if ($('.choice-button.btn.ng-binding.choice').length > 0) { 
setTimeout(function(){$('#submit_button').click();},0750)}}

if ( i.keyCode == 70 || i.keyCode == 100 ) { //F or npad 4 - Choice 4
$('.choice-button.btn.ng-binding.choice').eq(3).click();
if ($('.choice-button.btn.ng-binding.choice').length > 0) { 
setTimeout(function(){$('#submit_button').click();},0750)}}

if ( i.keyCode == 71 || i.keyCode == 101 ) { //G or npad 5 - Choice 5
$('.choice-button.btn.ng-binding.choice').eq(4).click();
if ($('.choice-button.btn.ng-binding.choice').length > 0) { 
setTimeout(function(){$('#submit_button').click();},0750)}}

if ( i.keyCode == 81 || i.keyCode == 102 ) { //Q or npad 6 - Choice 6
$('.choice-button.btn.ng-binding.choice').eq(5).click();
if ($('.choice-button.btn.ng-binding.choice').length > 0) { 
setTimeout(function(){$('#submit_button').click();},0750)}}

if ( i.keyCode == 87 || i.keyCode == 103 ) { //W or npad 7 - Choice 7
$('.choice-button.btn.ng-binding.choice').eq(6).click();
if ($('.choice-button.btn.ng-binding.choice').length > 0) { 
setTimeout(function(){$('#submit_button').click();},0750)}}

}