11/21 - Music for Airports Wednesday!

Status
Not open for further replies.

CrazyCatLady

..
Contributor
Crowd Pleaser
Joined
Jan 15, 2018
Messages
7,403
Reaction score
20,832
Points
1,363
Location
Arkansas
Gender
Female
Probably not the most elegant script, but here's one that defaults to "yes" on both questions.
// ==UserScript==
// Name @Name A9 exact
// @version 0.1
// @description Defaults both questions for "Is This Exact" to "yes"
// @author Captain France
// @include *s3.amazonaws.com*
// @require https://code.jquery.com/jquery-3.0.0-alpha1.min.js
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
// ==/UserScript==
$('input[value="yesMatch"]').click();
$('input[value="yesEnough"]').click();




Which one did you need? I basically never delete scripts so there's a good chance I have it.


It was the Customer Interest on where you say yes/no A9s.
And that script says invalid when I tried it ;(
 

MarkC

Stay awhile and listen.
Contributor
Joined
Dec 11, 2016
Messages
1,720
Reaction score
4,404
Points
588
Age
51
Gender
Male
It was the Customer Interest on where you say yes/no A9s.
And that script says invalid when I tried it ;(
Code:
// ==UserScript==
// @icon         http://www.woodus.com/den/gallery/graphics/dq9ds/shield/silver_platter.png
// @name         Customer Interests - Product Interest / Keyword Relevance Audit [mturk]
// @namespace    Scripts->Foundation->Humans
// @version      1.1.8.2017.09.27
// @description  Automatically selects a default value on Customer Interest hits, focuses in frame, and allows custom key to radio element bindings.
// @author       D.M.K. & R.E.G. @ MegaCorp, Inc
// @include      https://s3.amazonaws.com/mturk_bulk/hits/*
// @include      https://www.mturkcontent.com/dynamic/*
// @require      https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js
// @PANDA        https://www.mturk.com/mturk/previewandaccept?groupId=3KAZLCS3F9ALRMAYYRWSFLQTNUFAPT (Keyword Relevance to Interest Audit)
// @PANDA        https://www.mturk.com/mturk/previewandaccept?groupId=36ARV8EEI75YW67UK35RLDFB7MHAVL (Product to Interest Audit)
// @PANDA        https://www.mturk.com/mturk/previewandaccept?groupId=34KQN2TBLUDI4EQQQ80MAQV63FLAS7 (Produkt zum Interesse Relevanz Audit)
// @TEST_LINK    https://s3.amazonaws.com/mturk_bulk/hits/275394612/SrFWZUmNqGj7BmxnX0fUGg.html?assignmentId=ASSIGNMENT_ID_NOT_AVAILABLE&hitId=3PIOQ99R7YK4YAD76BQH1FC89QLUNZ           
// @compatible   Known to work on: Chrome 46+, Tampermonkey v4.3.6+, Windows 7 x64
// ==/UserScript==
/* jshint expr: true */ // Make JSHint shut up about short circuiting

/* USER configurable settings */
const DEFAULT_UR_CLICK = $(':radio')[1]; // No
//const DEFAULT_UR_CLICK = $(':radio')[0]; // Yes

const DEFAULT_IR_CLICK = $(':radio')[0]; // Yes
//const DEFAULT_IR_CLICK = $(':radio')[1]; // No

/* Action keys */
// NOTE: Format of jump table is keycode and number (index) of the desired radio button. These were labeled KEY_YES, KEY_NO, KEY_DEBATE and KEY_SKIP, but this is variable based on number of radio buttons.
//       For example, the Product Interest doesn't have 'Debatable'.  The submit key is a special case: it's 13 by default, but can be anything; the 'radio' binding is always ignored.
const KEY_SUBMIT = 13; // default submit key; must be set here and below.
const JUMP_TABLE = { 97: 0, // NP1 - radio button 1 (Usually Yes)
                    49: 0, // 1
                    98: 1, // NP2 - radio button 2 (Usually No)
                    50: 1, // 2
                    99: 2, // NP3 - radio button 3 (Debatable or Skip (rarely used))
                    100: 3, // NP4 - radio button 4 (Usually Skip)
                    13: 666 // Submit. keycode:ignored (can't just use KEY_SUBMIT, javascript doesn't recognize const x = 1 as x equaling 1!)
                   };
/* Utility Constants */
const DEFAULT_FOCUS = $(':radio')[0];
const MAGIC_KEY_GOAL = "The goal is to answer the question:Is the keyword uniquely relevant to the interest?";
const MAGIC_ITEM_GOAL = "The goal is to answer the question: Is the item relevant to the interest?";
const MAGIC_ITEM_SEX = "The goal is to answer the question: Is the item relevant to the interest and not sexually explicit?";
const MAGIC_DOUCHE = "Das Ziel ist, die Frage zu beantworten: Ist der Artikel für das Interesse relevant?";

/* Sanity check function */
const magic = $('.panel-body>p').text();

/* Key handler */
const addKeyJumpHandler = j=>{document.addEventListener('keydown',e=>{if (j.hasOwnProperty(k=e.which)){e.preventDefault();if (k === KEY_SUBMIT) $('#submitButton').click(); else (r= $(':radio')[j[k]]) && r.click();}});};

$(function() {
    if (magic === MAGIC_KEY_GOAL || magic === MAGIC_ITEM_SEX || magic === MAGIC_ITEM_GOAL || magic === MAGIC_DOUCHE) {
        console.info(`${GM_info.script.name} ${GM_info.script.version}`);
        Ç(['.panel-primary']);
        addKeyJumpHandler(JUMP_TABLE);
        DEFAULT_FOCUS.focus();
        if (magic === MAGIC_KEY_GOAL) DEFAULT_UR_CLICK.click();
        else if (magic === MAGIC_ITEM_GOAL || magic === MAGIC_DOUCHE) DEFAULT_IR_CLICK.click();
    }
});

function Ç(å) {if (å.length){const ï = "Instructions";$('body').prepend('<button id="☢" type="button" style="width: 8em;float: none;border-radius: 42%;outline:none;">-'+ï+'</button>');
                             $("#☢").click(()=>{$('#☢').text((ì,Œ)=>{return (Œ.slice(0,1) === '+'?'-':'+')+ï;});å.forEach((µ)=>{$(µ).toggle();});}).click()[0].scrollIntoView();}}

// Auxiliary notes:
// AHK for Three Monitors using number pad 5 to submit and go to next window:
//     NumPad5::
//     Send {Enter}
//     Send !{Tab 2}
//     return
// AHK to cycle to the next tab:
//     NumPad5::
//     Send {Enter}
//     Send {LCtrl down}{Tab}{LCtrl up}
//     return
This one maybe?
 
Joined
Feb 27, 2017
Messages
184
Reaction score
276
Points
313
Age
36
Gender
Male
It was the Customer Interest on where you say yes/no A9s.
And that script says invalid when I tried it ;(
Here's the one for "product to interest," which I think is the name for the Customer Interest HITs.
Code:
// ==UserScript==
// @name         Product To Interest
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @include *s3.amazonaws.com*
// @include *
// @require https://code.jquery.com/jquery-3.0.0-alpha1.min.js
// ==/UserScript==
(function() {
    'use strict';
    // Your code here...
    $("input[value='yes']").click();
})();
I'll check out my script and see if I didn't copy something right or something.

--edit: It wasn't in a code block before, I don't know if that makes a difference, but I edited the post.
Besides that, I don't know, it feels like it's missing some javascript formatting stuff at the end, but I'm not sure what; not exactly experienced in this language.
 
Last edited:

esprit-hyperdoux

Crowd Disappointer
Requester
Contributor
Joined
May 9, 2017
Messages
640
Reaction score
3,199
Points
568
for anyone who wants to view the archived thread, it's here, and the researchers' draft paper is here
i haven't gotten around to making a TO account yet but i'll do that when i have the stomach to read any more about this
the mtg thread features some ~~very helpful~~~ contributions from Lord Edgy McEdgerson the edgeth earl of Edgington
a later draft of the paper, updated with "disagreeable image tagging" task, found at portner's website.
 
  • Like
Reactions: MarkC

Despairagus

Jorf Beeboos ???
Contributor
Crowd Pleaser
Joined
Feb 6, 2018
Messages
8,495
Reaction score
27,082
Points
1,263
Age
39
Gender
Female
Here's the one for "product to interest," which I think is the name for the Customer Interest HITs.
Code:
// ==UserScript==
// @name         Product To Interest
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @include *s3.amazonaws.com*
// @include *
// @require https://code.jquery.com/jquery-3.0.0-alpha1.min.js
// ==/UserScript==
(function() {
    'use strict';
    // Your code here...
    $("input[value='yes']").click();
})();
I'll check out my script and see if I didn't copy something right or something.

--edit: It wasn't in a code block before, I don't know if that makes a difference, but I edited the post.
Besides that, I don't know, it feels like it's missing some javascript formatting stuff at the end, but I'm not sure what; not exactly experienced in this language.
This one tells me that $ is not defined? nvmnd the script saved but isn't working for me.
 
Last edited:
  • Like
Reactions: Captain France

Despairagus

Jorf Beeboos ???
Contributor
Crowd Pleaser
Joined
Feb 6, 2018
Messages
8,495
Reaction score
27,082
Points
1,263
Age
39
Gender
Female

Jerami

Well-Known Member
Contributor
Crowd Pleaser
HIT Poster
Joined
Jan 24, 2016
Messages
14,405
Reaction score
25,210
Points
2,238
Thank you MarkC @MarkC and Captain France @Captain France
Reinstalling windows sucks. I'm never updating my laptop again lol!
Make sure to set a restore point and backup, once you have a clean install. At least, next time, you can go back to that without having to reinstall, usually. Doesn't always work but, it's a start.:)
 
Last edited:

CrazyCatLady

..
Contributor
Crowd Pleaser
Joined
Jan 15, 2018
Messages
7,403
Reaction score
20,832
Points
1,363
Location
Arkansas
Gender
Female
Here's the one for "product to interest," which I think is the name for the Customer Interest HITs.
Code:
// ==UserScript==
// @name         Product To Interest
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @include *s3.amazonaws.com*
// @include *
// @require https://code.jquery.com/jquery-3.0.0-alpha1.min.js
// ==/UserScript==
(function() {
    'use strict';
    // Your code here...
    $("input[value='yes']").click();
})();
I'll check out my script and see if I didn't copy something right or something.

--edit: It wasn't in a code block before, I don't know if that makes a difference, but I edited the post.
Besides that, I don't know, it feels like it's missing some javascript formatting stuff at the end, but I'm not sure what; not exactly experienced in this language.

The script still says invalid. Has an 'error'? symbol on the last two lines. idk. I know NOTHING about this stuff lol.
Thanks for trying
 

CrazyCatLady

..
Contributor
Crowd Pleaser
Joined
Jan 15, 2018
Messages
7,403
Reaction score
20,832
Points
1,363
Location
Arkansas
Gender
Female
Make sure to set a restore point and backup, once you have a clean install. At least, next time, you can go back to that without haveing to reinstall, usually. Doesn't always work but, it's a start.:)
I will! The only thing I was worried about was keeping my files so I didn't lose the 5 page paper I JUST typed.
 
  • Like
Reactions: Jerami

CrazyCatLady

..
Contributor
Crowd Pleaser
Joined
Jan 15, 2018
Messages
7,403
Reaction score
20,832
Points
1,363
Location
Arkansas
Gender
Female
I was gonna ask how everyone's PE's are today lol
 
Joined
Feb 27, 2017
Messages
184
Reaction score
276
Points
313
Age
36
Gender
Male
This one tells me that $ is not defined? nvmnd the script saved but isn't working for me.
Oh no, that one right there is an older script by someone else (they don't seem to have signed it, though) for a different set of A9s. I posted my script for the current A9s back a bit, but I'll post it again.
It didn't work for CrazyCatLady when I posted it the first time, but I also forgot to put it in a code block, if that makes a difference? I'm not that skilled at the parts of Javascript that aren't the same as regular Java, so, formatting stuff.
Code:
// ==UserScript==
// @name         A9 exact
// @version      0.1
// @description  Defaults both questions for "Is This Exact" to "yes"
// @author       Captain France
// @include *s3.amazonaws.com*
// @require https://code.jquery.com/jquery-3.0.0-alpha1.min.js
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
// ==/UserScript==
    $('input[value="yesMatch"]').click();
    $('input[value="yesEnough"]').click();
The script still says invalid. Has an 'error'? symbol on the last two lines. idk. I know NOTHING about this stuff lol.
Thanks for trying
Dunno, that one's not mine. It has a yellow "$ is not defined" warning for me, too, but it saved and it works on those so ¯\_(ツ)_/¯

--Edit: Also my PE for today is only $2.03 so far, but I ran an errand earlier and walked home and cooked a good lunch, so I just got started a little bit ago, plus I keep getting distracted.
 
Last edited:

CrazyCatLady

..
Contributor
Crowd Pleaser
Joined
Jan 15, 2018
Messages
7,403
Reaction score
20,832
Points
1,363
Location
Arkansas
Gender
Female
Oh no, that one right there is an older script by someone else (they don't seem to have signed it, though) for a different set of A9s. I posted my script for the current A9s back a bit, but I'll post it again.
It didn't work for CrazyCatLady when I posted it the first time, but I also forgot to put it in a code block, if that makes a difference? I'm not that skilled at the parts of Javascript that aren't the same as regular Java, so, formatting stuff.
Code:
// ==UserScript==
// @name         A9 exact
// @version      0.1
// @description  Defaults both questions for "Is This Exact" to "yes"
// @author       Captain France
// @include *s3.amazonaws.com*
// @require https://code.jquery.com/jquery-3.0.0-alpha1.min.js
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
// ==/UserScript==
    $('input[value="yesMatch"]').click();
    $('input[value="yesEnough"]').click();

Dunno, that one's not mine. It has a yellow "$ is not defined" warning for me, too, but it saved and it works on those so ¯\_(ツ)_/¯


I googled and went to TH (sorry guysss) and found a code there. I'll update if it works.
I quickly left, lol


Edit: Nope. idk! Probably user error..(aka my fault) :p
 
Last edited:
  • Like
Reactions: Despairagus
Status
Not open for further replies.