[Script] RoofTyper Helper

Discussion in 'mTurk Scripts & Resources' started by slothbear, Aug 26, 2017.

  1. slothbear

    slothbear Survey Slinger

    Messages:
    10,821
    Gender:
    Male
    Ratings:
    +22,069
    Here's a quick script for the RoofTyper HITs if they come back. If it isn't working, send me a message and I'll try to update it!

    1-3 for roof shape choices
    q-e for the different issues
    set autosubmit true/false to submit/not submit after using one of the keybinds

    p.s. - if you have autosubmit off, don't use any of the keybinds if you type in the suggestion box in the HIT. You choice will get changed

    Code:
    // ==UserScript==
    // @name         RoofTyper Helper
    // @version      2.0
    // @author       slothbear
    // @include      https://rooftyper.com/*
    // @require      https://code.jquery.com/jquery-3.2.1.min.js
    
    // ==/UserScript==
    
    // 1-3 for the roof shape choices
    // q,w,e for the issue choices
    
    var autosubmit = false;    //set true or false to submit after using a keybind
    
    $(function() {
        const is_roofShape = document.body.innerText.indexOf('Roof Shape') > -1; 
        if (!is_roofShape) return false;    //end if sanity check finds nothing
        roofShape();
    });
    
    function roofShape() {
        $('p').eq(0).remove();    //remove some extra text
        $(document).keydown(function(e) {
            if (e.key.match(/[1-3]/)) {    //1-3 for roof shapes
                var roofShapeChoice = e.key - 1;
                $('input.shape:radio').eq(roofShapeChoice).click();
            } else if (e.key === 'q' ) {    //q - e for issues
                $('input[name="issue"]').eq(0).click();
            } else if (e.key === 'w') {    //q-e for issues
                $('input[name="issue"]').eq(1).click();
            } else if (e.key === 'e') {    //q-e for issues
                $('input[name="issue"]').eq(2).click();
            }
            if (autosubmit) $('#submitButton').click();    //submit hit if 'autosubmit = true'
        });
    }
     
    • Today I Learned Today I Learned x 2
  2. lefty

    lefty Survey Slinger

    Messages:
    18,930
    Gender:
    Female
    Ratings:
    +49,005
    Thank you slothbear :)
     
    • Like Like x 1
  3. UCOTC

    UCOTC Active Turker

    Messages:
    660
    Gender:
    Male
    Ratings:
    +612
    Thanks, but which requester is this for? My turkopticon search for Roof and Rooftyper didn't turn up anything obvious. While the HITS are probably long gone, a HIT serach for the term "roof" came up empty as well.
     
  4. slothbear

    slothbear Survey Slinger

    Messages:
    10,821
    Gender:
    Male
    Ratings:
    +22,069
    The requester is RoofTyper, id A2O2IHD4GZ208P. They posted a bunch yesterday, and may or may not pop up again in a few days. They've shown up with several big batches (cheap, but good filler) over the past sixth months or so.
     
  5. UCOTC

    UCOTC Active Turker

    Messages:
    660
    Gender:
    Male
    Ratings:
    +612
    Thanks. There's no recent TO, and that ID is currently listed in the TO search as "Map Solutions" which is why I couldn't find it.
     
    • Like Like x 1
  6. slothbear

    slothbear Survey Slinger

    Messages:
    10,821
    Gender:
    Male
    Ratings:
    +22,069
    Yeah, I think they used to use that name. If you use OW, just put their ID in there and wait. It could be a month or two before they post again....or tomorrow, you never know. :dunno: