02/20 - Wasting Away on Wednesday

Do you like the new dashboard?


  • Total voters
    41
Status
Not open for further replies.

SarahAshlee90

Well-Known Member
Crowd Pleaser
Joined
Mar 4, 2016
Messages
2,781
Reaction score
5,294
Points
963
Age
33
Gender
Female
Code:
// ==UserScript==
// @name         Rowan
// @version      2.0
// @description  Numpad or Number keys work as keybindings, Spacebar for checkbox, Enter to Submit
// @author       SarahAshlee90
// @include     /^https://(www|s3)\.(mturkcontent|amazonaws)\.com/
// @grant        none
// @require     https://code.jquery.com/jquery-3.1.1.min.js
// ==/UserScript==

const radios = Array.from(document.querySelectorAll('[type="radio"]'));
var i = 0;
window.addEventListener("keydown", function (event) {
    if(event.code === "Numpad1" || event.code === "Digit1") {
        if (i < 18) {
            radios[i].click();
            i += 3;
            radios[i].focus();
        } else if (i >= 18) {
            radios[i].click();
            i += 6;
            radios[i].focus();
        }
    }
    if(event.code === "Numpad2" || event.code === "Digit2"){
        if (i < 18) {
            radios[i+1].click();
            i += 3;
            radios[i].focus();
        } else if (i >= 18) {
            radios[i+1].click();
            i += 6;
            radios[i].focus();
        }
    }
    if(event.code === "Numpad3" || event.code === "Digit3"){
        if (i < 18) {
            radios[i+2].click();
            i += 3;
            radios[i].focus();
        } else if (i >= 18) {
            radios[i+2].click();
            i += 6;
            radios[i].focus();
        }
    }
    if(event.code === "Numpad4" || event.code === "Digit4"){
        if (i < 18) {
            return;
        } else if (i >= 18 && i <= 29) {
            radios[i+3].click();
            i += 6;
        }
    }
    if(event.code === "Numpad5" || event.code === "Digit5"){
        if (i < 18) {
            return;
        } else if ( i >= 18 && i <= 29) {
            radios[i+4].click();
            i += 6;
        }
    }
    if(event.code === "Numpad6" || event.code === "Digit6"){
        if (i < 18) {
           return;
        } else if (i >= 18 && i <= 29) {
            radios[i+5].click();
            i += 6;
        }
    }
    if(event.code === "Space") {
        $('input[name="hard"]').click();
    }
    if(event.code === "Enter" || event.code === "NumpadEnter") {
        coin ();
        setTimeout(function(){ $('input[id="submitButton"]').click(); }, 50);
    }
});

function coin () {
    var audio = document.createElement("audio");
    audio.src = "http://www.superluigibros.com/downloads/sounds/GAMECUBE/SUPERMARIOSUNSHINE/WAV/coin.wav";
    audio.play();
}
Jerami @Jerami The sound should work right now.
CrazyCatLady @CrazyCatLady Non-numpad numbers work on this version.
themildone @themildone Numpad Enter submits on this version.
 

themildone

the real Jaded
Contributor
HIT Poster
Joined
Jan 12, 2016
Messages
19,285
Reaction score
46,776
Points
1,438
Age
29
Location
Indiana
Gender
Female
Code:
// ==UserScript==
// @name         Rowan
// @version      2.0
// @description  Numpad or Number keys work as keybindings, Spacebar for checkbox, Enter to Submit
// @author       SarahAshlee90
// @include     /^https://(www|s3)\.(mturkcontent|amazonaws)\.com/
// @grant        none
// @require     https://code.jquery.com/jquery-3.1.1.min.js
// ==/UserScript==

const radios = Array.from(document.querySelectorAll('[type="radio"]'));
var i = 0;
window.addEventListener("keydown", function (event) {
    if(event.code === "Numpad1" || event.code === "Digit1") {
        if (i < 18) {
            radios[i].click();
            i += 3;
            radios[i].focus();
        } else if (i >= 18) {
            radios[i].click();
            i += 6;
            radios[i].focus();
        }
    }
    if(event.code === "Numpad2" || event.code === "Digit2"){
        if (i < 18) {
            radios[i+1].click();
            i += 3;
            radios[i].focus();
        } else if (i >= 18) {
            radios[i+1].click();
            i += 6;
            radios[i].focus();
        }
    }
    if(event.code === "Numpad3" || event.code === "Digit3"){
        if (i < 18) {
            radios[i+2].click();
            i += 3;
            radios[i].focus();
        } else if (i >= 18) {
            radios[i+2].click();
            i += 6;
            radios[i].focus();
        }
    }
    if(event.code === "Numpad4" || event.code === "Digit4"){
        if (i < 18) {
            return;
        } else if (i >= 18 && i <= 29) {
            radios[i+3].click();
            i += 6;
        }
    }
    if(event.code === "Numpad5" || event.code === "Digit5"){
        if (i < 18) {
            return;
        } else if ( i >= 18 && i <= 29) {
            radios[i+4].click();
            i += 6;
        }
    }
    if(event.code === "Numpad6" || event.code === "Digit6"){
        if (i < 18) {
           return;
        } else if (i >= 18 && i <= 29) {
            radios[i+5].click();
            i += 6;
        }
    }
    if(event.code === "Space") {
        $('input[name="hard"]').click();
    }
    if(event.code === "Enter" || event.code === "NumpadEnter") {
        coin ();
        setTimeout(function(){ $('input[id="submitButton"]').click(); }, 50);
    }
});

function coin () {
    var audio = document.createElement("audio");
    audio.src = "http://www.superluigibros.com/downloads/sounds/GAMECUBE/SUPERMARIOSUNSHINE/WAV/coin.wav";
    audio.play();
}
Jerami @Jerami The sound should work right now.
CrazyCatLady @CrazyCatLady Non-numpad numbers work on this version.
themildone @themildone Numpad Enter submits on this version.
you da bomb :love:
 

Sondi

Goddess of soup
Contributor
Crowd Pleaser
Joined
Jan 12, 2016
Messages
9,018
Reaction score
33,771
Points
1,213
Age
34
Gender
Female
But they're REALLY cute, and your home seems really neat for having kiddos! I'm always impressed when people have small humans and also are clean lol
Thanks :angelic: I just keep toys out of that room for the most part since it's where I do my music... all the toys are in the living room :grimace: I do try to keep it down to an acceptable level (for me) because it stresses me out to be too messy and we don't have a separate playroom.
 

Roscoe E Goldchain

Hood Haiku Specialist
Contributor
HIT Poster
Joined
Jan 25, 2016
Messages
11,770
Reaction score
28,998
Points
1,438
Location
VA
Gender
Male
Title: Complete a workplace problem solving test(~ 30 minutes) | PANDA
Requester: Nicolas Roulin [A1WL6Y141Z8XJT] (Req TV): $17.15/hr/hr
(TO): [Pay: N/A] [Fair: N/A] [Comm: N/A] [Fast: N/A]
Description:
Complete the &quot;Conditional Reasoning Test for Workplace Problems&quot; for USD $3 (US/CAN workers only)
Time: 1 hour(s)
HITs Available: 1
Reward: $3.00
Qualifications: Total approved HITs GreaterThanOrEqualTo 100; HIT approval rate (%) GreaterThanOrEqualTo 70; Location In CAUS; Exc: [128574623-129688] DoesNotExist ;
 

4ourfuture

Well-Known Member
Contributor
Joined
Jun 27, 2017
Messages
3,158
Reaction score
7,531
Points
838
Gender
Female
Title: The Hunger Games | PANDA
Requester: joseph shepherd [A8HSPSD88CUTS] (Req TV): $24.11/hr/hr
(TO): [Pay: 3.40] [Fair: 3.80] [Comm: 5.00] [Fast: 3.80]
Description:
May the odds be ever in your favor...
Time: 10 minutes(s)
HITs Available: 1
Reward: $0.00
Qualifications: None;

I'm pretty sure this is the crazy guy who rejected everyone yesterday for a "fun game."
 
Status
Not open for further replies.