ProductRnR

Makes all of the ProductRnR HITs easier/faster.

< 脚本ProductRnR的反馈

评价:好评 - 脚本运行良好

§
发表于:2016-07-11

Script prevents context menu and doesn't properly cycle radio buttons.


This script (by design) disables the context menu, which prevents using extensions like 'Image Viewer' to zoom in on images, or even opening images in a new tab to save. [This is an issue for me because without being able to zoom in on images I can't make a proper determination for relevancy.]


The script is also broken, needing to use the right mouse button to toggle "no load", because the left button doesn't properly cycle through the three options.


For anyone else annoyed by these bugs, here is an incredibly sloppy fix for them.


Context menu disable:

Delete this:
$('.documentbox').contextmenu( function() {
return false;
});


Right click hijack:

Change this:
$(".documentbox").click(function(e){e.preventDefault();});
to this:
$(".documentbox").click(function(e){ if (e.which == 1) e.preventDefault();});


Failure to cycle through all three radio buttons:

Change this:
$(".documentbox").mousedown(function(e){
switch (e.which) {
case 1:
if($(this).find("input:radio:checked").next(":contains(Excellent):not(:contains('Not'))").length > 0){
$(this).find("input[value='Bad']").prop("checked", true).change();return false;
}
if($(this).find("input:radio:checked").next(":contains(Image didn't load)").length > 0){
$(this).find("input[value='Excellent']").prop("checked", true).change();return false;
}
if($(this).find("input:radio:checked").next(":contains(Not Excellent)").length > 0){
$(this).find("input[value='Excellent']").prop("checked", true).change();return false;
}
break;
case 3:
$(this).find("input[value='NoLoad']").prop("checked", true).change();return false;
break;
}
});


to this:
$(".documentbox").mousedown(function(e){
if (e.which == 1 ) {
var $radios = $(this).find('input:radio');
var $checked = $radios.filter(':checked');
var $prev = $radios.eq($radios.index($checked) - 1);
if(!$prev.length){ $prev = $radios.last(); }
$prev.prop("checked", true).change();
}
});

发表回复

登录(不可用)以发表回复。

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址