JR zing receipt helper for mturk.com

A script for zings with no auto submit to follow MTG rules.

目前为 2014-11-05 提交的版本。查看 最新版本

// ==UserScript==
// @name        JR zing receipt helper for mturk.com
// @version     0.1
// @namespace   https://gf.qytechs.cn/users/6406
// @description A script for zings with no auto submit to follow MTG rules.
// @author      John Ramirez (JohnnyRS)
// @include     http*://*ibotta.com/duplicate_receipt_moderation/*
// @grant       none
// ==/UserScript==

// This script should follow the no auto submit rule on MTG forum. Just press n for no duplicate receipts.
// Press y for when the receipts are the SAME. You can click on the submit button to submit or press enter.
// This script only gives focus to the submit button and does not click it automatically.
if (document.getElementsByClassName("container")[0].getElementsByTagName("h1")[0].innerHTML.indexOf("Are these pictures of the same receipt?") != -1 ) {
    //console.log("found a zing I can work with");
    var noDuplicates = document.getElementById("duplicatefalse");
    var yesDuplicates = document.getElementById("duplicatetrue");
    var submitButton = document.getElementsByClassName("submitctrl")[0].getElementsByClassName("btn")[0];
    
    document.onkeydown = function (e) {
        if (e.keyCode == 78) {              // n pressed
            noDuplicates.checked=true;
            submitButton.focus();           // Only gives focus to the submit button and will not auto submit it.
        } else if (e.keyCode == 89) {       // y pressed
            yesDuplicates.checked=true;
            submitButton.focus();           // Only gives focus to the submit button and will not auto submit it.
        }
    };
}

QingJ © 2025

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