06/22 - Techie Thursday!

Status
Not open for further replies.
D

Deleted member 526

Guest
Code:
// ==UserScript==
// @name         OCMP5 - Which Product Type is the most relevant? (v3.1)
// @namespace    http://your.homepage/
// @version      0.1
// @description  enter something useful
// @author       turker
// @grant        none
// @require     http://code.jquery.com/jquery-latest.min.js
// @include        *
// @exclude     http://www.mturkcrowd.com/*
// ==/UserScript==
if ( $("body:contains('Product Name')").length ) {
document.getElementsByClassName("check_list")[0].getElementsByTagName("input")[0].focus();
var howMany = "";
var counter = 0;
document.getElementsByTagName("body")[0].onkeydown = function(event) {
howMany = document.getElementsByClassName("check_list")[counter].getElementsByTagName("input").length;
for (i=0;i<howMany;i++) {
if (event.keyCode == i+49) {
document.getElementsByClassName("check_list")[counter].getElementsByTagName("input")[i].click();
counter = counter +1;
if (counter == 2) {
// this submits the 2nd answer as blank sometimes so don't use this part unless it's fixed
//document.getElementsByClassName("button cc-button submit-btn btn btn-primary ")[0].click();
}
}
}
};
}
is my 5's script okay? or is it going to submit blank results sometimes? I wrote it. I want to use this 1.
Kadauchi @Kadauchi do you know? is this an onchange event so if I manually click the enter button with the mouse, then it works all the time? also do you know how I can get it to turn in without blanks?
 
  • Like
Reactions: Rerun

unfortuNate

Closed Qual Whore
Banned
Contributor
Joined
Feb 18, 2017
Messages
1,828
Reaction score
3,736
Points
388
Gender
Male
Code:
// ==UserScript==
// @name         OCMP5 - Which Product Type is the most relevant? (v3.1)
// @namespace    http://your.homepage/
// @version      0.1
// @description  enter something useful
// @author       turker
// @grant        none
// @require     http://code.jquery.com/jquery-latest.min.js
// @include        *
// @exclude     http://www.mturkcrowd.com/*
// ==/UserScript==
if ( $("body:contains('Product Name')").length ) {
document.getElementsByClassName("check_list")[0].getElementsByTagName("input")[0].focus();
var howMany = "";
var counter = 0;
document.getElementsByTagName("body")[0].onkeydown = function(event) {
howMany = document.getElementsByClassName("check_list")[counter].getElementsByTagName("input").length;
for (i=0;i<howMany;i++) {
if (event.keyCode == i+49) {
document.getElementsByClassName("check_list")[counter].getElementsByTagName("input")[i].click();
counter = counter +1;
if (counter == 2) {
// this submits the 2nd answer as blank sometimes so don't use this part unless it's fixed
//document.getElementsByClassName("button cc-button submit-btn btn btn-primary ")[0].click();
}
}
}
};
}
is my 5's script okay? or is it going to submit blank results sometimes? I wrote it. I want to use this 1.
so um id avoid a script because thats why my qual got revoked. Mine ALWAYS showed a radio button clicked, but they claim that i had blank answers.
 
Status
Not open for further replies.