1. Glad you stopped in for a visit!

    Please feel free to peruse around and if you have a minute make sure to sign up for an account! We're one of the largest, most active, and helpful communities you'll find for learning about mTurk & registered accounts automatically get access to tons of useful features on the site.

    Features for members include:

    • The ability to post messages - our community is incredibly helpful & happy to welcome newcomers who are looking to learn the ropes!
    • Live thread update - no need to refresh pages to see new posts/HITs they flow onto the page automatically as they're posted.
    • Desktop alerts - direct PANDAs from exported HITs right on your desktop
    • Access to the full list of HITs exported through the Daily HIT Log
    • TurkerView account which will grant you extra access to HIT review information all across mTurk through TVJS

    But most importantly you'll be joining an amazing community. You'll find all types here, from stay-at-home Moms to IT pros. We're a great group - feel free to join us!

MRX - Write the code shown in an image

Discussion in 'mTurk Scripts & Resources' started by rosesword975, Dec 4, 2016.

  1. rosesword975

    rosesword975 New Member

    Messages:
    19
    Gender:
    Female
    Ratings:
    +11 / 0 / -0
    In honor of the new site I will post two of my scripts. One is for masters (another post) and this one is just a basic one that does not require masters.
    I know it ain't much, but it might help out some newbies.

    Code:
    
    // ==UserScript==
    // @name        @shared - MRX - Write the code shown in an image
    // @namespace   https://greasyfork.org/en/users/13132-rosesword975
    // @version     1
    // @author       rosesword975
    // @description puts cursor in box automatically and hides instructions
    // @grant       none
    // @include     https://www.mturkcontent.com/dynamic/*
    // @require     http://code.jquery.com/jquery-2.1.4.min.js
    // @require     https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js
    // ==/UserScript==
    
    $(document).ready(function(){
      if($('body:contains(Transcribe the code contained in the image.)').length){
       
        // Creates button and hides instructions.
        $(".panel.panel-primary").before('<button id="toggle" type="button"><span>Show Instructions</span></button>');
        $(".panel.panel-primary").after('<br></br>');
        $(".panel.panel-primary").hide();
    
        // Toggles instructions and changes toggle text.
        $('#toggle').click(function() {
        $(".panel.panel-primary").toggle();
        $('#toggle').text() == 'Show Instructions' ? str = 'Hide Instructions' : str = 'Show Instructions';
        $('#toggle span').html(str);
        });
       
        $('input[name="Answer"]').focus();
       
      }
    });