06/09 - Fffriday

HIT Poster Voting

  • Mr. Krabs

    Votes: 77 51.7%
  • ElleWoods

    Votes: 26 17.4%
  • Squatty

    Votes: 29 19.5%
  • JenniLeigh

    Votes: 6 4.0%
  • Roscoe E Goldchain

    Votes: 11 7.4%

  • Total voters
    149
  • Poll closed .
Status
Not open for further replies.

Shawnbks9090

Active Member
Contributor
Joined
Dec 25, 2016
Messages
967
Reaction score
1,019
Points
468
Gender
Male


Code:
// ==UserScript==
// @name       DCF - Shoe feature labelling
// @version    1.4
// @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 presets = [];
    presets.push(['Athletic', 1,3,1,1,1,1]);
    presets.push(['Not A Shoe', 3,4,4,4,4,6]);
  
  

    $('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> | <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 (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();
            }
        });
    }
}
Added a couple preset options you can click to fill in the whole thing. You can add more or change them by adding or changing or deleting the lines like:

presets.push(['Athletic', 1,3,1,1,1,1]);

If you want to add a new one, copy and paste that under the existing ones, change the name and the numbers to fit the values you want it to pick. Maybe we can collect the best ones and I can add them to the script after people figure it out.
Bloody Genius:pompus:
 
  • Like
Reactions: Kerek and Rerun

lobo925

CEO of Pizza
Contributor
Joined
Jan 13, 2016
Messages
8,054
Reaction score
18,324
Points
1,163
Location
Internet
Gender
Male
Was about to get started on those Dolan hits, but seems like a lot of work for 2.50.. returned em all
 

coffeeowl

hoo?
Contributor
Mentor
Master Pleaser
Crowd Pleaser
HIT Poster
Joined
Jan 12, 2016
Messages
28,032
Reaction score
63,933
Points
1,738
Location
Location EqualTo US
Gender
Female
Title: Rate the skill of a surgeon shown on a video clip | PANDA
Worker: Preview | Accept | Requester
Requester: C-SATS, Inc [A15ZSKX8TUCGEU] (Contact)
TO 1: [Pay: 3.14] [Fast: 4.62] [Comm: 4.00] [Fair: 4.19] [Reviews: 87] [ToS: 0]
TO 2:
[Rate: $22.40/hr] [Pen: 1.00 days] [Res: -- of 0] [Rec: 100% of 1] [Rej: 0] [ToS: 0] [Brk: 0]
Description:
This is a research study where you watch a video clip of a surgical procedure (no patient or surgeon identification is shown) and rate the skill level of the surgeon. (undefined)
Time: 45 minutes
HITs Available: 4
Reward: $0.82
Qualifications: Total approved HITs GreaterThanOrEqualTo 100; C-SATS Block DoesNotExist ; HIT approval rate (%) GreaterThanOrEqualTo 95;
HIT exported from Mturk Suite v1.21.10
 
  • Like
Reactions: Mr. Krabs

KellieS23

Anyone else feel like a Rainbow?
Contributor
Joined
Apr 6, 2016
Messages
6,287
Reaction score
10,331
Points
1,063
Location
Kansas
Gender
Female
So I spent some $$ today...
Hubby and I both got Pixels
and we bought 2 Google Home things (we got a rebate for them, so they'll be free when we get that $$)
 
Status
Not open for further replies.