[Script] Ceedj's ProductRNR script

Discussion in 'mTurk Scripts & Resources' started by ceedj, Nov 21, 2016.

  1. ceedj

    ceedj Survey Slinger

    Messages:
    2,767
    Gender:
    Male
    Ratings:
    +6,020
    Hey folks, this is kind of a "catch all" script, that handles a variety of ProductRNR HITs. All it does it auto select the first or most commonly found answers (depends on the HIT) - it does NOTHING else very fancy. Enter to submit (has a dialog, will clean that up in the near future).

    WATCH YOUR SPAM SCORE AND DON'T DO THESE TOO FAST!

    Right then, here is the code:
    Code:
    // ==UserScript==
    // @name         Product RnR Captions/Images ($0.05/$0.08/$0.10/$0.15)
    // @namespace    None
    // @version      1.0.3
    // @description  Phrasing!
    // @author       ceedj / Adapted from JQKill's CogDev Faces Script
    // @include      *.mturkcontent.com/*
    // @include      https://s3.amazonaws.com/mturk_public/*
    // @grant        GM_log
    // @require      http://code.jquery.com/jquery-2.1.0.min.js
    // ==/UserScript==
    
    $(document).ready(function(){
    // Variable to check for the type of HIT.
    var my_var = $('h1:contains(caption)');
    var my_var2 =$(':contains(image)');
    var my_var3 =$(':contains(corresponding)');
    var my_var4 =$(':contains(identify)');
    if (my_var.length || my_var2.length || my_var3.length || my_var4.length)
    {
     window.focus();
     
        $("input[value='ImageCaption_UpperBetter'],input[value='ImageSimilarity_Left'],input[value='ShoppingImage_MatchesProduct'], input[value='Correct'],input[value='QueryImage_Unrelated'],input[value='ShoppingPage_ProductAvailable']").click();
    
     
     
        // Keybinds
        document.onkeydown = function(e) {
    
         
             //Submit
            if (e.keyCode === 13) { // Enter or NumpadEnter
                var button = document.getElementById("SubmitButton");
                if (confirm("Submit?")) button.click();
            }
        };
    }});
    
    Have fun and make lots of monies! :)
     
    Last edited: Nov 22, 2016
  2. Jagdpanzer

    Jagdpanzer Survey Slinger

    Messages:
    2,960
    Gender:
    Male
    Ratings:
    +3,443


    Hi ceedj,

    I noticed I have 2 "older versions" of this. Different code in each, but all 3 are version 1.0.1??
     
  3. ceedj

    ceedj Survey Slinger

    Messages:
    2,767
    Gender:
    Male
    Ratings:
    +6,020
    This should be 1.0.3, thanks! If I can figure out how to edit the thread, I'll fix it! :)

    EDIT: @ChrisTurk , can't seem to edit my opening post. Permissions issue? Thanks!
     
    • Today I Learned Today I Learned x 1
  4. Jagdpanzer

    Jagdpanzer Survey Slinger

    Messages:
    2,960
    Gender:
    Male
    Ratings:
    +3,443

    Could always post it again with an explanation.
     
  5. ChrisTurk

    ChrisTurk Administrator

    Messages:
    56,679
    Ratings:
    +162,927
    Fiddled with user group permissions, let me know if its fixed.
     
  6. ceedj

    ceedj Survey Slinger

    Messages:
    2,767
    Gender:
    Male
    Ratings:
    +6,020
    Edits accomplished! Thanks boss! :)
     
    • Like Like x 1
  7. Ana*

    Ana* H&R Blockhead

    Messages:
    21,637
    Gender:
    Female
    Ratings:
    +27,162
    thanks for sharing the script guys. just wanted to work a bit today and that did it. hope you all had a good day even if there was barely any $$ to be made here.