Greasy Fork

RelevanceQuest HIT Helper

(mTurk) Selects all "Non Adult" radio buttons in "Flag images - (WARNING: This HIT may contain adult content. Worker discretion is advised.)" Clicking on an image flags it as explicit. Clicking on an image twice flags it as fetish. Right clicking on an image flags it as gruesome. Middle clicking an image flags it as suggestive.

当前为 2014-10-20 提交的版本,查看 最新版本

// ==UserScript==
// @name       RelevanceQuest HIT Helper
// @namespace  http://ericfraze.com
// @version    0.6
// @description  (mTurk) Selects all "Non Adult" radio buttons in "Flag images - (WARNING: This HIT may contain adult content. Worker discretion is advised.)" Clicking on an image flags it as explicit. Clicking on an image twice flags it as fetish. Right clicking on an image flags it as gruesome. Middle clicking an image flags it as suggestive.
// @include    https://s3.amazonaws.com/mturk_bulk/hits/*
// @include    https://www.mturkcontent.com/dynamic/hit*
// @copyright  2014+, Eric Fraze
// @require     http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js
// ==/UserScript==

$(document).ready(function() {
    $("table[border='1'][cellpadding='4']").css("display", "none");
    
	$("input[value='NOT_ADULT']").prop('checked', true);
    
    $("img").dblclick( function() {
        $(this).parents("td").find("input[value='PERVERSION']").click();
        $(this).parents("td").find("input[value='PERVERSION']").focusWithoutScrolling();
        $(this).css("opacity", "0.6");
    });
    
    $('img').mousedown(function(event) {
        switch (event.which) {
            case 1:
                $(this).parents("td").find("input[value='EXPLICIT']").click();
                $(this).parents("td").find("input[value='EXPLICIT']").focusWithoutScrolling();
                $(this).css("opacity", "0.6");
                break;
            case 2:
                $(this).parents("td").find("input[value='SUGGESTIVE']").click();
                $(this).parents("td").find("input[value='SUGGESTIVE']").focusWithoutScrolling();
                $(this).css("opacity", "0.6");
                break;
            case 3:
                $(this).parents("td").find("input[value='GRUESOME']").click();
                $(this).parents("td").find("input[value='GRUESOME']").focusWithoutScrolling();
                $(this).css("opacity", "0.6");
                break;
        }
    });
});

document.addEventListener("contextmenu", function(e){
    if (e.target.nodeName === "IMG") {
        e.preventDefault();
    }
}, false);


$.fn.focusWithoutScrolling = function(){
  var x = window.scrollX, y = window.scrollY;
  this.focus();
  window.scrollTo(x, y);
};

$(document.body).on("mousedown", function (e) { e.preventDefault(); } );