[Script] Masters - Peter - Find the first names and usernames of Instagram users

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

  1. rosesword975

    rosesword975 New Member

    Messages:
    19
    Gender:
    Female
    Ratings:
    +11 / 0 / -0
    Here's the Master Script.

    Code:
    
    // ==UserScript==
    // @name         @Mshared - Peter - Find the first names and usernames of Instagram users
    // @namespace    https://greasyfork.org/en/users/13132-rosesword975
    // @version      1
    // @author       rosesword975
    // @description  Hides Instructions; copies username from link to correct box ; and puts "n/a" into the first name box and focuses on the first name box.
    // @grant        GM_log
    // @include      https://s3.amazonaws.com/mturk_bulk/hits/*
    // @require      https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js
    // @require      http://code.jquery.com/jquery-2.1.4.min.js
    // ==/UserScript==
    
    $(document).ready(function(){
      if ($('body:contains(Capitalize the first letter of their first name)').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);
        });
       
        var link = $('a').eq(0).text();
        var split = link.split("/");      
       
          //window.open(link, 'pete and repeat');
          $('input[name="UserName"]').val(split[3]);
          $('input[name=FirstName]').focus().val("n/a");
      }
    });
     
    • Useful / Informative Useful / Informative x 1