06/10 - Spineroony Saturday!

Status
Not open for further replies.

Shawnbks9090

Active Member
Contributor
Joined
Dec 25, 2016
Messages
967
Reaction score
1,019
Points
468
Gender
Male
Kerek @Kerek
added boot and high heel boot.
any way to line these to the right? Its easier to go straight down one side?

Code:
presets.push(['Athletic', 1,3,1,1,1,1]);
    presets.push(['Boot', 1,2,1,1,2,4]);
    presets.push(['High Heel Boot', 1,1,3,1,2,4]);
    presets.push(['Not A Shoe', 3,4,4,4,4,6]);
(Yours are the unchanged)
 
  • Like
Reactions: Kerek

Kerek

Red Cat-Bear
Contributor
Crowd Pleaser
Joined
Jan 12, 2016
Messages
65,302
Reaction score
145,850
Points
2,088
Gender
Male
Kerek @Kerek
added boot and high heel boot.
any way to line these to the right? Its easier to go straight down one side?

Code:
presets.push(['Athletic', 1,3,1,1,1,1]);
    presets.push(['Boot', 1,2,1,1,2,4]);
    presets.push(['High Heel Boot', 1,1,3,1,2,4]);
    presets.push(['Not A Shoe', 3,4,4,4,4,6]);
(Yours are the unchanged)
The table is already crazy wide, do you mean going down to the right of the shoe image maybe?
 

Pippa

All things lovely and beautiful.
Contributor
Joined
Jan 12, 2016
Messages
7,219
Reaction score
16,375
Points
1,163
Gender
Female
I picked a bad day to start my Turkathon... stupid bills don't listen though.
Good thing about it though is you can just watch tv or piddle around on the internet while you wait for something.
 
  • Like
Reactions: PhantomCatt

sweetpea0678

Well-Known Member
Joined
Feb 4, 2016
Messages
1,103
Reaction score
4,901
Points
513
Age
46
Gender
Female
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.
EZPZ
 

lobo925

CEO of Pizza
Contributor
Joined
Jan 13, 2016
Messages
8,054
Reaction score
18,324
Points
1,163
Location
Internet
Gender
Male
Title: Translate a short Egyptian Arabic audio file into English | PANDA
Requester: langlab [A2AMJOI31EH4U4] (TO)
TO Ratings:
★★★★★ 0.00 Communicativity
★★★★ 4.33 Generosity
★★★★ 4.67 Fairness
★★★★ 4.33 Promptness
Number of Reviews: 3 | TOS Flags: 0
Submit a new TO review
Description: Translate an audio file in the Egyptian Arabic language of about one minute duration into English language text
Time: 60 minutes
HITs Available: 4
Reward: $0.50
Qualifications: Total approved HITs is not less than 10;HIT approval rate (%) is not less than 80
 

Kerek

Red Cat-Bear
Contributor
Crowd Pleaser
Joined
Jan 12, 2016
Messages
65,302
Reaction score
145,850
Points
2,088
Gender
Male

guess i dont know how to post an image...its on imgur
http://imgur.com/a/u3UWW
change
Code:
        $('table:eq(2)').before('<h3><span class="presets_list">' + preset_labels.join('</span> | <span class="presets_list">') + '</span></h3>');
to
Code:
        $('table:eq(2)').before('<h3 style="margin-left:'+($('table:eq(2) td:eq(0)').width() + $('table:eq(2) td:eq(1)').width()+10)+'px;"><span class="presets_list">' + preset_labels.join('</span> | <span class="presets_list">') + '</span></h3>');
line 125ish

Edit: I dunno about removing parts of the descriptions of the options to save more space. I don't want to encourage people to do them less well than they otherwise could. Maybe as an option in the script that you have to change so new users don't miss the extended descriptions.

You can already make the image bigger by changing the scaling. Reducing the width of the table doesn't affect how big you can make the image.
 
Last edited:
  • Like
Reactions: nopoopwarez

TSolo315

SnapNCrackle
Administrator
Joined
Jan 12, 2016
Messages
5,000
Reaction score
16,977
Points
2,538
Gender
Male
Title: Find the Locations + Earn Bonus | PANDA
Requester: AA TB Research [A3IA4UJVO6FLC6] (TO)
TO Ratings:
★★★★★ 0.00 Communicativity
★★★★★ 5.00 Generosity
★★★★★ 5.00 Fairness
★★★★★ 5.00 Promptness
Number of Reviews: 2 | TOS Flags: 0
Submit a new TO review
Description: Given the campaign website, find the URL for campaign events
Time: 3 hours
HITs Available: 475
Reward: $0.10
Qualifications: HIT approval rate (%) is greater than 90;Location is US
 

Michele

Working on degree in Moon
Contributor
HIT Poster
Joined
Feb 28, 2017
Messages
17,492
Reaction score
32,878
Points
1,388
Location
California
Gender
Female
Title: 3 minute research study(~ 3 minutes) | PANDA
Worker: Preview | Accept | Requester
Requester: MPR Lab [A1D3TEW14SPDKU] (Contact)
TO 1: [Pay: 3.96] [Fast: 4.91] [Comm: 4.36] [Fair: 4.88] [Reviews: 193] [ToS: 1]
TO 2:
[Rate: $7.37/hr] [Pen: 0.52 days] [Res: 0% of 1] [Rec: 60% of 5] [Rej: 0] [ToS: 0] [Brk: 0]
Description:
Participate in a research task
Time: 2 hours
HITs Available: 19
Reward: $0.50
Qualifications: Exc: [45952801-46420] has not been granted; Total approved HITs is not less than 100; HIT approval rate (%) is not less than 95; Location is one of: US;
HIT exported from Mturk Suite v1.21.10
 

SarahAshlee90

Well-Known Member
Crowd Pleaser
Joined
Mar 4, 2016
Messages
2,781
Reaction score
5,294
Points
963
Age
34
Gender
Female
: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/
I'm just curious, how long did it take you to write this?
 
Status
Not open for further replies.