您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Marks a default radio button depending on the HIT.
当前为
// ==UserScript== // @name ProductRnR // @namespace https://gf.qytechs.cn/users/11580 // @version 1.5.2 // @description Marks a default radio button depending on the HIT. // @author Kadauchi // @include https://www.mturkcontent.com/dynamic/* // @grant GM_log // @require http://code.jquery.com/jquery-2.1.4.min.js // ==/UserScript== // Marks radio buttons. $(".label.nal").click(); $("input[value='notadult']").click(); // Marks Non-Adult. // Checks to see if we are on Label images based on their relevance for the query. if ($("b:contains(Unrelated/Only Indirectly Related)").length){ ProductRnR_Relevance_Query(); } function ProductRnR_Relevance_Query(){ $(":radio").on('change',function(){ $(this).next(":contains(Related)").parent().parent().css("opacity", "1").css({ backgroundColor: "lightgreen", opacity: "1"}); $(this).next(":contains(Unrelated/Indirectly Related)").parent().parent().css("opacity", "1").css({ backgroundColor: "red", opacity: "1"}); $(this).next(":contains(Image didn't load)").parent().parent().css({ backgroundColor: "", opacity: "0.1"}); }); $("input[value='QueryImage_Unrelated']").prop("checked", true).change(); $(".documentbox").click(function(e){e.preventDefault();}); $('.documentbox').contextmenu( function() { return false; }); $(".documentbox").mousedown(function(e){ switch (e.which) { case 1: if($(this).find("input:radio:checked").next(":contains(Related):not(:contains('Unrelated'))").length > 0){ $(this).find("input[value='QueryImage_Unrelated']").prop("checked", true).change();return false; } if($(this).find("input:radio:checked").next(":contains(Image didn't load)").length > 0){ $(this).find("input[value='QueryImage_Related']").prop("checked", true).change();return false; } if($(this).find("input:radio:checked").next(":contains(Unrelated/Indirectly Related)").length > 0){ $(this).find("input[value='QueryImage_Related']").prop("checked", true).change();return false; } break; case 3: $(this).find("input[value='NoLoad']").prop("checked", true).change();return false; break; } }); $("img").error(function(){ $(this).parents(".documentbox").find("input[value='NoLoad']").prop("checked", true).change(); }); } // Enter will sunmit the HIT. window.onkeydown = function(event) { if (event.keyCode === 13) { $("button[name='SubmitButton']").click(); } };
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址