Making Basic Scripts

What would you prefer to see for the next video?


  • Total voters
    16
  • Poll closed .

Squatty

.
Contributor
Crowd Pleaser
HIT Poster
Joined
Mar 17, 2016
Messages
21,286
Reaction score
44,989
Points
2,538
Age
31
Gender
Female
The first thing that you need to do is find the names and values that you need for your script.
As an example, I am going to use the Clinic Hits - Comment aggressiveness analysis

This script will mark everything as "Not Aggressive" from the beginning.
We need to find the value for the "Not Aggressive button.
There are 2 ways to do this. One is to look at the Frame Source code and the other is to Inspect the Frame.

For this example, I will Inspect the frame.
To do that, Right Click inside the frame and select the bottom result which is called Inspect.
You will see a screen come up on the right half of your screen, like this:


Next, click on the button that looks like an arrow (which I circled in red). This allows you to select elements with the mouse.
Then click on the button, you would like to have marked.

Here is what you will see after you click the button, and I underlined in red what information we need. Which is the value.


You should check a few others to ensure they all have the same value, which they do.
 

Squatty

.
Contributor
Crowd Pleaser
HIT Poster
Joined
Mar 17, 2016
Messages
21,286
Reaction score
44,989
Points
2,538
Age
31
Gender
Female
The JQuery code that you would use to mark everything as selected looks like this:

$('input[value="XX"]').click();

Where "XX" is the value that we would like selected.

We already know that the value we want for this script is "Not Aggressive".
Always be careful with Capitalization, because JQuery is case sensitive.

$('input[value="Not Aggressive"]').click();

This is the code we need.
Now to make the script.
 
Last edited:

Squatty

.
Contributor
Crowd Pleaser
HIT Poster
Joined
Mar 17, 2016
Messages
21,286
Reaction score
44,989
Points
2,538
Age
31
Gender
Female
Go to your Tampermonkey Button on your toolbar and click it. Then click on "Create a New Script"

You go to a screen that looks like this:



What I usually do, is delete everything in here and copy over code that I already know works and then change it.

Such as this:

Code:
// ==UserScript==
// @name        Sergey Submit
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Add submit button
// @author       Squatty
// @match        https://www.mturkcontent.com/dynamic/*
// @grant         GM_log
// @require      http://code.jquery.com/jquery-3.1.1.min.js
// ==/UserScript==
First I will change the name to "Clinic"
Then change the description to "Select Not Aggressive"

Then I need to ensure that the @match is correct.
The way to get the @match is by Right Clicking on the Frame again, and this time we will view the frame source.

You will see a lot of code and the address bar will have an address in it like this:



We need to copy the address from the https: until the /hits/

https://s3.amazonaws.com/mturk_bulk/hits/

This is what we need our match to be.
We also need to add a * at the end, The * means 'wild" meaning to match anything with that first part of the address with anything after it.

change the @match to: https://s3.amazonaws.com/mturk_bulk/hits/*

Now your code so far should look like this:
Code:
// ==UserScript==
// @name         Clinic
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Select Not Aggressive
// @author       Squatty
// @match        https://s3.amazonaws.com/mturk_bulk/hits/*
// @grant        GM_log
// @require      http://code.jquery.com/jquery-3.1.1.min.js
// ==/UserScript==

You guys can also change the Author name, since you will all be authors now :)
 
Last edited:

Squatty

.
Contributor
Crowd Pleaser
HIT Poster
Joined
Mar 17, 2016
Messages
21,286
Reaction score
44,989
Points
2,538
Age
31
Gender
Female
The last and final part, is to put the pieces together.

Add the code we created with the value to your code we adjusted above and click save.

Then test your script :)

It should be working
 

T. Leela

Oh Lord...
Contributor
Joined
May 12, 2016
Messages
11,046
Reaction score
14,036
Points
1,388
Location
Colorado
Gender
Female
Thanks so much! I have been trying to learn, but had issues with not having time or patience for things that don't directly apply to what I can use on Mturk now, but didn't know enough to pick those things out very well. I can always take my time to learn more after. Very helpful.
 

Liviing

Living
Joined
Jun 22, 2016
Messages
36
Reaction score
44
Points
268
Gender
Male
I'm hella deep into these Clinics but now that I think about it idk if I should stop or what lol
 

Kadauchi

Well-Known Member
Master Pleaser
Crowd Pleaser
Joined
Jan 12, 2016
Messages
7,012
Reaction score
21,709
Points
1,263
Saving your template.

Step 1: Go to settings.


Step 2: Change config mode to advanced.


Step 3: Edit and save EMCAScript5


Now when you start a new script all of your stuff will be there.


Here is my preset
Code:
// ==UserScript==
// @name         New Userscript
// @namespace    https://github.com/Kadauchi
// @version      1.0.0
// @description  Does things...
// @author       Kadauchi
// @icon         http://i.imgur.com/oGRQwPN.png
// @include      /^https://(www\.mturkcontent|s3\.amazonaws)\.com/
// @require      http://code.jquery.com/jquery-3.2.1.min.js
// ==/UserScript==
 

Squatty

.
Contributor
Crowd Pleaser
HIT Poster
Joined
Mar 17, 2016
Messages
21,286
Reaction score
44,989
Points
2,538
Age
31
Gender
Female
Here is my first YouTube Video.
If it is helpful please let me know and i can make more.
If there is anything in particular you would like to see, please tell me.


Here is the source code I used, if you would like to try it
Code:
<body class="" style="">
    <div id="app"><div data-reactroot=""><nav class="navbar navbar-default" style="padding-bottom: 10px;"><div class="container"><div class="navbar-header"><span class="navbar-brand"><a href="https://www.pinterest.com" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pinit_fg_en_round_red_32.png" alt="Pinterest" class=""></a><!-- react-text: 8 -->&nbsp;&nbsp;Pinterest Human Computation<!-- /react-text --></span></div></div></nav><div class="container"><div><!-- react-empty: 128 --><!-- react-empty: 17 --><!-- react-empty: 13 --><!-- react-empty: 14 --><!-- react-empty: 15 --><div><!-- react-empty: 19 --><h5 style="text-align: center;"><span class="glyphicon glyphicon-info-sign"></span><!-- react-text: 22 --> <!-- /react-text --><!-- react-text: 23 -->Press ? to see some handy shortcuts used to navigate the assignment<!-- /react-text --></h5><div class="row"><div class="page-header"><h1>Rate How Relevant a Pin Is to a Query</h1></div><div class="panel panel-default"><div class="panel-heading"><h3 class="panel-title"><a aria-expanded="true" aria-selected="true"><!-- react-text: 31 -->Instructions<!-- /react-text --><!-- react-text: 32 --> <!-- /react-text --><span class="glyphicon glyphicon-chevron-up"></span></a></h3></div><div class="panel-collapse collapse in" aria-hidden="false"><div class="panel-body"><div><div><h1><!-- react-text: 39 -->Purpose<!-- /react-text --></h1><!-- react-text: 40 -->  <!-- /react-text --><p><!-- react-text: 42 -->The purpose of this job is to judge how well the search results match the query<!-- /react-text --></p><h1><!-- react-text: 44 -->Guidelines<!-- /react-text --></h1><!-- react-text: 45 -->  <!-- /react-text --><p><!-- react-text: 47 --> Take a look at the query (search term) below. If you aren't sure what it means, you can click the words to do a search for that term. <!-- /react-text --></p><p><!-- react-text: 49 --> Once you know what the query means, take a look at the Pin below. It has an image and a description. Does the Pin match what <!-- /react-text --><i><!-- react-text: 51 -->most people<!-- /react-text --></i><!-- react-text: 52 --> would want when they search for that query? <!-- /react-text --></p><!-- react-text: 53 --> <!-- /react-text --><p><!-- react-text: 55 --> Rate how well the Pin matches the query on a 1-5 scale, where 1 is completely irrelevant and 5 is a great match. <!-- /react-text --><br><!-- react-text: 57 -->If something doesn't work, just rate the Pin a 3.<!-- /react-text --></p><p><!-- react-text: 59 --> That's it, thanks! <!-- /react-text --></p><!-- react-text: 60 --> <!-- /react-text --></div></div></div></div></div><div class="panel panel-default"><div class="panel-heading"><h3 class="panel-title"><a aria-expanded="true" aria-selected="true"><!-- react-text: 65 -->Task 1/10<!-- /react-text --><!-- react-text: 66 --> <!-- /react-text --><span class="glyphicon glyphicon-chevron-up"></span></a></h3></div><div class="panel-collapse collapse in" aria-hidden="false"><div class="panel-body"><form><input type="hidden" name="taskAssignmentId" value="1958349"><div><div class="container-fluid"><!-- react-text: 74 -->  <!-- /react-text --><div class="row"><!-- react-text: 76 -->    <!-- /react-text --><div width="4" class="col-sm-4 col-sm-offset-NaN"><!-- react-text: 78 -->      <!-- /react-text --><h3><!-- react-text: 80 -->The Search Result<!-- /react-text --></h3><!-- react-text: 81 -->      <!-- /react-text --><div><span class="pinterest-widget--pin pin-widget--small"><a class="pin-widget-pin-link" href="https://www.pinterest.com/pin/219691288045634923/" target="_blank"><img class="pin-widget-pin-link-img" alt="How To: Make your basil plant grow full and bushy instead of tall and sparse by cutting it in the right places." data-pin-do="embedPin" data-pin-nopin="true" src="https://s-media-cache-ak0.pinimg.com/237x/f3/36/5a/f3365aec4adce6a07c3422eae6a616d7.jpg" width="100%"></a><span class="pin-widget-meta"><a class="pin-widget-meta-anchor" href="https://17apart.com"><!-- react-text: 134 -->from <!-- /react-text --><b>17apart.com</b></a></span><span class="pin-widget-description"><div>How To: Make your basil plant grow full and bushy instead of tall and sparse by cutting it in the right places.</div></span></span></div><!-- react-text: 83 -->    <!-- /react-text --></div><!-- react-text: 84 -->    <!-- /react-text --><div width="8" class="col-sm-8 col-sm-offset-NaN"><!-- react-text: 86 -->      <!-- /react-text --><h3><!-- react-text: 88 -->The Query:         <!-- /react-text --><a href="https://google.com/search?q=growing basil from cuttings" target="_blank"><!-- react-text: 90 -->          <!-- /react-text --><!-- react-text: 91 -->growing basil from cuttings<!-- /react-text --><!-- react-text: 92 -->        <!-- /react-text --></a><!-- react-text: 93 -->      <!-- /react-text --></h3><!-- react-text: 94 -->      <!-- /react-text --><div><div class="form-group"><label class="control-label"><!-- react-text: 98 -->Is the search result what most people would expect when searching for <!-- /react-text --><!-- react-text: 99 -->growing basil from cuttings<!-- /react-text --><!-- react-text: 100 -->?<!-- /react-text --></label><div class="form-group"><label class="radio-inline"><input type="radio" name="questionAnswers.q1" value="0"><!-- react-text: 104 -->1- Irrelevant<!-- /react-text --></label><label class="radio-inline"><input type="radio" name="questionAnswers.q1" value="1"><!-- react-text: 107 -->2<!-- /react-text --></label><label class="radio-inline"><input type="radio" name="questionAnswers.q1" value="2"><!-- react-text: 110 -->3<!-- /react-text --></label><label class="radio-inline"><input type="radio" name="questionAnswers.q1" value="3"><!-- react-text: 113 -->4<!-- /react-text --></label><label class="radio-inline"><input type="radio" name="questionAnswers.q1" value="4"><!-- react-text: 116 -->5 - Relevant<!-- /react-text --></label></div></div></div><!-- react-text: 117 -->    <!-- /react-text --></div><!-- react-text: 118 -->  <!-- /react-text --></div></div></div><hr><div role="toolbar" class="pull-right btn-toolbar"><button type="submit" class="btn btn-lg btn-primary"><div><span class="glyphicon glyphicon-chevron-right"></span><!-- react-text: 124 --> <!-- /react-text --><!-- react-text: 125 -->Next<!-- /react-text --></div></button></div></form></div></div></div></div></div></div></div></div></div>
    <script src="/dist/bundle.js"></script>

</body>
And here is the code I used for the script
Code:
$(document).ready(function() {
  $('[name="questionAnswers.q1"]').focus();
  $(this).keydown(function(e) {
    if (e.keyCode == 49) {
      $('input[name="questionAnswers.q1"][value="1"]').click();
      }
  });
  });
 
Last edited:

TheresaofAlbion

Working for noms
Contributor
Joined
Mar 20, 2016
Messages
977
Reaction score
1,983
Points
468
Age
40
Location
Kansas
Gender
Female
Your voice is beautiful! And thank you for this. I do it on and off when I have time. This is a great, simple write out.
 
  • Like
Reactions: kryss and Squatty

Kallee

Well-Known Member
Mentor
Contributor
Joined
Nov 6, 2016
Messages
2,179
Reaction score
3,266
Points
588
Gender
Female
Here is my first YouTube Video.
If it is helpful please let me know and i can make more.
If there is anything in particular you would like to see, please tell me.


Here is the source code I used, if you would like to try it
Code:
<body class="" style="">
    <div id="app"><div data-reactroot=""><nav class="navbar navbar-default" style="padding-bottom: 10px;"><div class="container"><div class="navbar-header"><span class="navbar-brand"><a href="https://www.pinterest.com" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pinit_fg_en_round_red_32.png" alt="Pinterest" class=""></a><!-- react-text: 8 -->&nbsp;&nbsp;Pinterest Human Computation<!-- /react-text --></span></div></div></nav><div class="container"><div><!-- react-empty: 128 --><!-- react-empty: 17 --><!-- react-empty: 13 --><!-- react-empty: 14 --><!-- react-empty: 15 --><div><!-- react-empty: 19 --><h5 style="text-align: center;"><span class="glyphicon glyphicon-info-sign"></span><!-- react-text: 22 --> <!-- /react-text --><!-- react-text: 23 -->Press ? to see some handy shortcuts used to navigate the assignment<!-- /react-text --></h5><div class="row"><div class="page-header"><h1>Rate How Relevant a Pin Is to a Query</h1></div><div class="panel panel-default"><div class="panel-heading"><h3 class="panel-title"><a aria-expanded="true" aria-selected="true"><!-- react-text: 31 -->Instructions<!-- /react-text --><!-- react-text: 32 --> <!-- /react-text --><span class="glyphicon glyphicon-chevron-up"></span></a></h3></div><div class="panel-collapse collapse in" aria-hidden="false"><div class="panel-body"><div><div><h1><!-- react-text: 39 -->Purpose<!-- /react-text --></h1><!-- react-text: 40 -->  <!-- /react-text --><p><!-- react-text: 42 -->The purpose of this job is to judge how well the search results match the query<!-- /react-text --></p><h1><!-- react-text: 44 -->Guidelines<!-- /react-text --></h1><!-- react-text: 45 -->  <!-- /react-text --><p><!-- react-text: 47 --> Take a look at the query (search term) below. If you aren't sure what it means, you can click the words to do a search for that term. <!-- /react-text --></p><p><!-- react-text: 49 --> Once you know what the query means, take a look at the Pin below. It has an image and a description. Does the Pin match what <!-- /react-text --><i><!-- react-text: 51 -->most people<!-- /react-text --></i><!-- react-text: 52 --> would want when they search for that query? <!-- /react-text --></p><!-- react-text: 53 --> <!-- /react-text --><p><!-- react-text: 55 --> Rate how well the Pin matches the query on a 1-5 scale, where 1 is completely irrelevant and 5 is a great match. <!-- /react-text --><br><!-- react-text: 57 -->If something doesn't work, just rate the Pin a 3.<!-- /react-text --></p><p><!-- react-text: 59 --> That's it, thanks! <!-- /react-text --></p><!-- react-text: 60 --> <!-- /react-text --></div></div></div></div></div><div class="panel panel-default"><div class="panel-heading"><h3 class="panel-title"><a aria-expanded="true" aria-selected="true"><!-- react-text: 65 -->Task 1/10<!-- /react-text --><!-- react-text: 66 --> <!-- /react-text --><span class="glyphicon glyphicon-chevron-up"></span></a></h3></div><div class="panel-collapse collapse in" aria-hidden="false"><div class="panel-body"><form><input type="hidden" name="taskAssignmentId" value="1958349"><div><div class="container-fluid"><!-- react-text: 74 -->  <!-- /react-text --><div class="row"><!-- react-text: 76 -->    <!-- /react-text --><div width="4" class="col-sm-4 col-sm-offset-NaN"><!-- react-text: 78 -->      <!-- /react-text --><h3><!-- react-text: 80 -->The Search Result<!-- /react-text --></h3><!-- react-text: 81 -->      <!-- /react-text --><div><span class="pinterest-widget--pin pin-widget--small"><a class="pin-widget-pin-link" href="https://www.pinterest.com/pin/219691288045634923/" target="_blank"><img class="pin-widget-pin-link-img" alt="How To: Make your basil plant grow full and bushy instead of tall and sparse by cutting it in the right places." data-pin-do="embedPin" data-pin-nopin="true" src="https://s-media-cache-ak0.pinimg.com/237x/f3/36/5a/f3365aec4adce6a07c3422eae6a616d7.jpg" width="100%"></a><span class="pin-widget-meta"><a class="pin-widget-meta-anchor" href="https://17apart.com"><!-- react-text: 134 -->from <!-- /react-text --><b>17apart.com</b></a></span><span class="pin-widget-description"><div>How To: Make your basil plant grow full and bushy instead of tall and sparse by cutting it in the right places.</div></span></span></div><!-- react-text: 83 -->    <!-- /react-text --></div><!-- react-text: 84 -->    <!-- /react-text --><div width="8" class="col-sm-8 col-sm-offset-NaN"><!-- react-text: 86 -->      <!-- /react-text --><h3><!-- react-text: 88 -->The Query:         <!-- /react-text --><a href="https://google.com/search?q=growing basil from cuttings" target="_blank"><!-- react-text: 90 -->          <!-- /react-text --><!-- react-text: 91 -->growing basil from cuttings<!-- /react-text --><!-- react-text: 92 -->        <!-- /react-text --></a><!-- react-text: 93 -->      <!-- /react-text --></h3><!-- react-text: 94 -->      <!-- /react-text --><div><div class="form-group"><label class="control-label"><!-- react-text: 98 -->Is the search result what most people would expect when searching for <!-- /react-text --><!-- react-text: 99 -->growing basil from cuttings<!-- /react-text --><!-- react-text: 100 -->?<!-- /react-text --></label><div class="form-group"><label class="radio-inline"><input type="radio" name="questionAnswers.q1" value="0"><!-- react-text: 104 -->1- Irrelevant<!-- /react-text --></label><label class="radio-inline"><input type="radio" name="questionAnswers.q1" value="1"><!-- react-text: 107 -->2<!-- /react-text --></label><label class="radio-inline"><input type="radio" name="questionAnswers.q1" value="2"><!-- react-text: 110 -->3<!-- /react-text --></label><label class="radio-inline"><input type="radio" name="questionAnswers.q1" value="3"><!-- react-text: 113 -->4<!-- /react-text --></label><label class="radio-inline"><input type="radio" name="questionAnswers.q1" value="4"><!-- react-text: 116 -->5 - Relevant<!-- /react-text --></label></div></div></div><!-- react-text: 117 -->    <!-- /react-text --></div><!-- react-text: 118 -->  <!-- /react-text --></div></div></div><hr><div role="toolbar" class="pull-right btn-toolbar"><button type="submit" class="btn btn-lg btn-primary"><div><span class="glyphicon glyphicon-chevron-right"></span><!-- react-text: 124 --> <!-- /react-text --><!-- react-text: 125 -->Next<!-- /react-text --></div></button></div></form></div></div></div></div></div></div></div></div></div>
    <script src="/dist/bundle.js"></script>

</body>
And here is the code I used for the script
Code:
$(document).ready(function() {
  $('[name="questionAnswers.q1"]').focus();
  $(this).keydown(function(e) {
    if (e.keyCode == 49) {
      $('input[name="questionAnswers.q1"][value="1"]').click();
      }
  });
  });
Thank you!!!
 
  • Like
Reactions: Squatty

Kadauchi

Well-Known Member
Master Pleaser
Crowd Pleaser
Joined
Jan 12, 2016
Messages
7,012
Reaction score
21,709
Points
1,263
Squatty @Squatty nice video, very well explained.

If this code is meant to keep the window focused for keybinds and stuff
Code:
$('[name="questionAnswers.q1"]').focus();
you can use this for everything.
Code:
window.focus();
 

kryss

carburante al fuoco
Nonsense and Shenanigans
Joined
Jan 10, 2016
Messages
20,783
Reaction score
61,202
Points
1,488
Here is my first YouTube Video.
If it is helpful please let me know and i can make more.
If there is anything in particular you would like to see, please tell me.


Here is the source code I used, if you would like to try it
Code:
<body class="" style="">
    <div id="app"><div data-reactroot=""><nav class="navbar navbar-default" style="padding-bottom: 10px;"><div class="container"><div class="navbar-header"><span class="navbar-brand"><a href="https://www.pinterest.com" target="_blank"><img src="http://assets.pinterest.com/images/pidgets/pinit_fg_en_round_red_32.png" alt="Pinterest" class=""></a><!-- react-text: 8 -->&nbsp;&nbsp;Pinterest Human Computation<!-- /react-text --></span></div></div></nav><div class="container"><div><!-- react-empty: 128 --><!-- react-empty: 17 --><!-- react-empty: 13 --><!-- react-empty: 14 --><!-- react-empty: 15 --><div><!-- react-empty: 19 --><h5 style="text-align: center;"><span class="glyphicon glyphicon-info-sign"></span><!-- react-text: 22 --> <!-- /react-text --><!-- react-text: 23 -->Press ? to see some handy shortcuts used to navigate the assignment<!-- /react-text --></h5><div class="row"><div class="page-header"><h1>Rate How Relevant a Pin Is to a Query</h1></div><div class="panel panel-default"><div class="panel-heading"><h3 class="panel-title"><a aria-expanded="true" aria-selected="true"><!-- react-text: 31 -->Instructions<!-- /react-text --><!-- react-text: 32 --> <!-- /react-text --><span class="glyphicon glyphicon-chevron-up"></span></a></h3></div><div class="panel-collapse collapse in" aria-hidden="false"><div class="panel-body"><div><div><h1><!-- react-text: 39 -->Purpose<!-- /react-text --></h1><!-- react-text: 40 -->  <!-- /react-text --><p><!-- react-text: 42 -->The purpose of this job is to judge how well the search results match the query<!-- /react-text --></p><h1><!-- react-text: 44 -->Guidelines<!-- /react-text --></h1><!-- react-text: 45 -->  <!-- /react-text --><p><!-- react-text: 47 --> Take a look at the query (search term) below. If you aren't sure what it means, you can click the words to do a search for that term. <!-- /react-text --></p><p><!-- react-text: 49 --> Once you know what the query means, take a look at the Pin below. It has an image and a description. Does the Pin match what <!-- /react-text --><i><!-- react-text: 51 -->most people<!-- /react-text --></i><!-- react-text: 52 --> would want when they search for that query? <!-- /react-text --></p><!-- react-text: 53 --> <!-- /react-text --><p><!-- react-text: 55 --> Rate how well the Pin matches the query on a 1-5 scale, where 1 is completely irrelevant and 5 is a great match. <!-- /react-text --><br><!-- react-text: 57 -->If something doesn't work, just rate the Pin a 3.<!-- /react-text --></p><p><!-- react-text: 59 --> That's it, thanks! <!-- /react-text --></p><!-- react-text: 60 --> <!-- /react-text --></div></div></div></div></div><div class="panel panel-default"><div class="panel-heading"><h3 class="panel-title"><a aria-expanded="true" aria-selected="true"><!-- react-text: 65 -->Task 1/10<!-- /react-text --><!-- react-text: 66 --> <!-- /react-text --><span class="glyphicon glyphicon-chevron-up"></span></a></h3></div><div class="panel-collapse collapse in" aria-hidden="false"><div class="panel-body"><form><input type="hidden" name="taskAssignmentId" value="1958349"><div><div class="container-fluid"><!-- react-text: 74 -->  <!-- /react-text --><div class="row"><!-- react-text: 76 -->    <!-- /react-text --><div width="4" class="col-sm-4 col-sm-offset-NaN"><!-- react-text: 78 -->      <!-- /react-text --><h3><!-- react-text: 80 -->The Search Result<!-- /react-text --></h3><!-- react-text: 81 -->      <!-- /react-text --><div><span class="pinterest-widget--pin pin-widget--small"><a class="pin-widget-pin-link" href="https://www.pinterest.com/pin/219691288045634923/" target="_blank"><img class="pin-widget-pin-link-img" alt="How To: Make your basil plant grow full and bushy instead of tall and sparse by cutting it in the right places." data-pin-do="embedPin" data-pin-nopin="true" src="https://s-media-cache-ak0.pinimg.com/237x/f3/36/5a/f3365aec4adce6a07c3422eae6a616d7.jpg" width="100%"></a><span class="pin-widget-meta"><a class="pin-widget-meta-anchor" href="https://17apart.com"><!-- react-text: 134 -->from <!-- /react-text --><b>17apart.com</b></a></span><span class="pin-widget-description"><div>How To: Make your basil plant grow full and bushy instead of tall and sparse by cutting it in the right places.</div></span></span></div><!-- react-text: 83 -->    <!-- /react-text --></div><!-- react-text: 84 -->    <!-- /react-text --><div width="8" class="col-sm-8 col-sm-offset-NaN"><!-- react-text: 86 -->      <!-- /react-text --><h3><!-- react-text: 88 -->The Query:         <!-- /react-text --><a href="https://google.com/search?q=growing basil from cuttings" target="_blank"><!-- react-text: 90 -->          <!-- /react-text --><!-- react-text: 91 -->growing basil from cuttings<!-- /react-text --><!-- react-text: 92 -->        <!-- /react-text --></a><!-- react-text: 93 -->      <!-- /react-text --></h3><!-- react-text: 94 -->      <!-- /react-text --><div><div class="form-group"><label class="control-label"><!-- react-text: 98 -->Is the search result what most people would expect when searching for <!-- /react-text --><!-- react-text: 99 -->growing basil from cuttings<!-- /react-text --><!-- react-text: 100 -->?<!-- /react-text --></label><div class="form-group"><label class="radio-inline"><input type="radio" name="questionAnswers.q1" value="0"><!-- react-text: 104 -->1- Irrelevant<!-- /react-text --></label><label class="radio-inline"><input type="radio" name="questionAnswers.q1" value="1"><!-- react-text: 107 -->2<!-- /react-text --></label><label class="radio-inline"><input type="radio" name="questionAnswers.q1" value="2"><!-- react-text: 110 -->3<!-- /react-text --></label><label class="radio-inline"><input type="radio" name="questionAnswers.q1" value="3"><!-- react-text: 113 -->4<!-- /react-text --></label><label class="radio-inline"><input type="radio" name="questionAnswers.q1" value="4"><!-- react-text: 116 -->5 - Relevant<!-- /react-text --></label></div></div></div><!-- react-text: 117 -->    <!-- /react-text --></div><!-- react-text: 118 -->  <!-- /react-text --></div></div></div><hr><div role="toolbar" class="pull-right btn-toolbar"><button type="submit" class="btn btn-lg btn-primary"><div><span class="glyphicon glyphicon-chevron-right"></span><!-- react-text: 124 --> <!-- /react-text --><!-- react-text: 125 -->Next<!-- /react-text --></div></button></div></form></div></div></div></div></div></div></div></div></div>
    <script src="/dist/bundle.js"></script>

</body>
And here is the code I used for the script
Code:
$(document).ready(function() {
  $('[name="questionAnswers.q1"]').focus();
  $(this).keydown(function(e) {
    if (e.keyCode == 49) {
      $('input[name="questionAnswers.q1"][value="1"]').click();
      }
  });
  });
Squatty @Squatty, this awesome!