06/10 - Spineroony Saturday!

Status
Not open for further replies.

electrolyte

The Ghost of MTurk Past
Contributor
Joined
Jan 10, 2016
Messages
19,184
Reaction score
45,979
Points
1,313
Title: Demographics survey | PANDA
Worker: Preview | Accept | Requester
Requester: Panos Ipeirotis [A3DL93QTPE513P] (Contact)
TO 1: [Pay: 4.42] [Fast: 4.74] [Comm: 5.00] [Fair: 5.00] [Reviews: 55] [ToS: 0]
TO 2:
[Rate: $3.00/hr] [Pen: 0.25 days] [Res: -- of 0] [Rec: -- of 0] [Rej: 0] [ToS: 0] [Brk: 0]
Description:
Demographics survey
Time: 60 minutes
HITs Available: 1
Reward: $0.05
Qualifications: None;
HIT exported from Mturk Suite v1.21.10
 

klingeemonster

Does this poncho make me look fat?
Contributor
Joined
Apr 5, 2016
Messages
2,974
Reaction score
7,289
Points
838
Age
59
Location
Southwest Missouri
Gender
Male
Title: Answer a Short Survey: Academic Research Study on Solar Energy | PANDA
Worker: Preview | Accept | Requester
Requester: KristinFriedrich [A1DLUVTV5DQJPN] (Contact)
TO 1: Not Available
TO 2: Not Available
Description: The purpose of this study is to test communication about possible energy systems in participants' homes. The survey will take 2 - 3 minutes.
Time: 5 minutes
HITs Available: 1
Reward: $0.50
Qualifications: Current Residence - Owned is 1; US Political Affiliation - Conservative is 1; Masters has been granted; Location is US;
HIT exported from Mturk Suite v1.21.10
1 min
 
  • Like
Reactions: sweetpea0678

jnalleyne

Well-Known Member
Joined
May 31, 2016
Messages
2,225
Reaction score
2,644
Points
513
:shifty:

I dunno what you're hoping for with that. Here's my take on it.

Code:
// ==UserScript==
// @name       DCF - Shoe feature labelling
// @version    1.5
// @require      https://code.jquery.com/jquery-2.1.4.min.js
// @include     https://s3.amazonaws.com/mturk_bulk/hits*
// @include     https://www.mturkcontent.com/dynamic/*
// @description For the DCF Shoes HITs
// @namespace https://greasyfork.org/users/11205
// ==/UserScript==

if ($('td:contains("Shoe feature labelling")').length){
    var image_scaling = 2.0;
    var default_zoom = true;
    var keyboard_active = true;
    var presets = [];
    presets.push(['Athletic', 1,3,1,1,1,1]);
    presets.push(['Not A Shoe', 3,4,4,4,4,6]);



    var active_row = 0;
    $('td:contains("Common Ambiguities")').wrapInner('<div class="instructions"></div>');
    $(".instructions").before('<button id="toggle" type="button"><span>Show Instructions</span></button>').hide();
    $('#toggle').click(function() {
        $(".instructions").toggle();
        $('#toggle').text() == 'Show Instructions' ? str = 'Hide Instructions' : str = 'Show Instructions';
        $('#toggle span').html(str);
    });

    $('table:eq(1)').after('<img id="shoeImage" src="' + $('td:contains("Link to shoe image")').next().find('a').attr('href') + '">');

    if (default_zoom){
        $('#shoeImage').load(function(){
            $('#shoeImage').width($('#shoeImage').width()*image_scaling);
            $('#shoeImage').toggleClass('zoomed');
        });
    }

    $('img').click(function(){
        if ($(this).hasClass('zoomed')){
            $(this).width($(this).width ()/image_scaling);
            $(this).toggleClass('zoomed');
        }
        else{
            $(this).width($(this).width ()*image_scaling);
            $(this).toggleClass('zoomed');
        }
    });


    $('table:eq(2) tr:gt(0)').append('<td class="filler"></td>');
    $('.filler').each(function(index){
        var fill_options = [];
        $(this).prev().find('option').each(function(){
            fill_options.push($(this).text().replace(/^\w\)/,'').split(':')[0]);
        });
        $(this).html('<span class="options_list' + index + '">' + fill_options.join('</span> <strong>|</strong> <span class="options_list' + index + '">') + '</span>');
    });
    $('[class^=options_list]').click(function(){
        $(this).parent().prev().find('select')[0].selectedIndex = $(this).parent().find('[class^=options_list]').index($(this));
        $('[class=' + $(this).attr('class') + ']').css('background-color','');
        $(this).css('background-color','lightgreen');
    });
    $('table:eq(2) tr:gt(0)').each(function(){
        $(this).find('span:last')[0].click();
    });
    $('table:eq(2) tr:eq(0) td:last').css('width','50px');

    if (keyboard_active){
        highlightRow(active_row);
        $('.filler').each(function(){
            $(this).find('span').each(function(index){
                $(this).text('(' + (index+1) + ') ' + $(this).text());
            });
        });
        document.addEventListener( "keydown", function(i) {
            var k = i.keyCode;
            if (k == 13 ){
                $('#submitButton').click();
            }
            else if (k > 48 && k < $('[class^=options_list' + active_row + ']').length + 49){
                $('[class^=options_list' + active_row + ']')[k-49].click();
                if (active_row < 5){
                    active_row++;
                    highlightRow(active_row);
                }
            }
            else if (k > 96 && k < $('[class^=options_list' + active_row + ']').length + 97){
                $('[class^=options_list' + active_row + ']')[k-97].click();
                if (active_row < 5){
                    active_row++;
                    highlightRow(active_row);
                }
            }
            else if (k == 38 || k == 109){
                if (active_row > 0){
                    active_row--;
                    highlightRow(active_row);
                }
            }
            else if (k == 40 || k==107){
                if (active_row < 5){
                    active_row++;
                    highlightRow(active_row);
                }
            }
            else if (k == 37){
                if ($('select')[active_row].selectedIndex > 0){
                    $('[class^=options_list' + active_row + ']')[$('select')[active_row].selectedIndex-1].click();
                }
            }
            else if (k == 39){
                if ($('select')[active_row].selectedIndex < $('[class^=options_list' + active_row + ']').length -1){
                    $('[class^=options_list' + active_row + ']')[$('select')[active_row].selectedIndex+1].click();
                }
            }
        } , false);
    }
    if (presets.length){
        var preset_labels = [];
        for (i=0;i<presets.length;i++){
            preset_labels.push(presets[i][0]);
        }
        $('table:eq(2)').before('<h3><span class="presets_list">' + preset_labels.join('</span> | <span class="presets_list">') + '</span></h3>');

        $('[class^=presets_list]').click(function(){
            var index =  $('[class^=presets_list]').index($(this));
            for (i=0;i<6;i++){
                $('select')[i].selectedIndex = presets[index][i+1]-1;
                $('table:eq(2) tr:eq(' +(i+1)+ ') td:last span')[presets[index][i+1]-1].click();
            }
        });
    }
}

function highlightRow(row_number){
    $('.filler').css('border','');
    $('.filler').eq(row_number).css({'border-style':'solid','border-width':'4px','border-color':'black'});
}


It starts with the first row highlighted, you can just press the number (keypad or number line) and it will enter that value and advance to the next line.
You can also use the arrow keys to navigate up and down and left and right.
Also - and + on the keypad will go up and down lines in case you messed up using the keypad.
Enter to submit.

You can also disable the keyboard stuff by changing
var keyboard_active = true;
to false if you just like clicking with the mouse.

https://greasyfork.org/en/scripts/30462-dcf-shoe-feature-labelling/


Seriously, you are the best. Thank you so much!
 
  • Like
Reactions: Kerek

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: Self-Evaluation and Context | PANDA
Worker: Preview | Accept | Requester
Requester: Emily Rosenthal [A2PHOW8XG2T41A] (Contact)
TO 1: Not Available
TO 2: [Rate: --/hr] [Pen: -- days] [Res: -- of 0] [Rec: 0% of 1] [Rej: 0] [ToS: 0] [Brk: 0]
Description:
In this 15-minute study, you will read vignettes and answer a series of related questions to which you will respond on an "Agree" to "Disagree" scale or similar.
Time: 1 hour
HITs Available: 1
Reward: $1.70
Qualifications: Total approved HITs GreaterThan 0; HIT approval rate (%) GreaterThanOrEqualTo 95; Location EqualTo US;
HIT exported from Mturk Suite v1.21.10
 

electrolyte

The Ghost of MTurk Past
Contributor
Joined
Jan 10, 2016
Messages
19,184
Reaction score
45,979
Points
1,313
  • Like
Reactions: shoesue87

electrolyte

The Ghost of MTurk Past
Contributor
Joined
Jan 10, 2016
Messages
19,184
Reaction score
45,979
Points
1,313
Title: Psychology Study - Brief questionnaire about your everyday behaviours | PANDA
Worker: Preview | Accept | Requester
Requester: Grisham Lab [A22Z9U0R2UVA14] (Contact)
TO 1: [Pay: 3.66] [Fast: 4.10] [Comm: 3.00] [Fair: 4.10] [Reviews: 31] [ToS: 0]
TO 2:
Not Available
Description: In this study you will be asked three questions about yourself, and then given a brief questionnaire about how you approach tasks in everyday life. The average completion time is 4-5min.
Time: 10 minutes
HITs Available: 1
Reward: $1.00
Qualifications: INVITED is 1;
HIT exported from Mturk Suite v1.21.10
2 minutes.
 

Pippa

All things lovely and beautiful.
Contributor
Joined
Jan 12, 2016
Messages
7,219
Reaction score
16,375
Points
1,163
Gender
Female
Favorite tiny videos come from this youtuber.

I like the music too.

 
Status
Not open for further replies.