10/31 - ʞɔᴉɹ┴ or Treat to ┴ɥɹᴉllǝɹ Tuesday!

Discussion in 'Daily mTurk HITs Threads' started by Tripsa, Oct 31, 2017.

Thread Status:
Not open for further replies.
  1. ChrisTurk

    ChrisTurk Administrator

    Messages:
    56,724
    Ratings:
    +163,220
    I already did this one last year. You'd probably love it (minus the JQ) actually:

    Code:
    // ==UserScript==
    // @name _THsss Thread Tools
    // @version 1.0
    // @description none
    // @author ChrisTurk
    // @include https://turkerhub.com/*
    // @grant GM_log
    // @require https://code.jquery.com/jquery-3.1.0.min.js
    // ==/UserScript==
    $( document ).ready(function(){ aprilFools(); });
    function aprilFools() {
    if ($('.loginText').length || $( '.crumb' ).text().indexOf('Daily mTurk') == -1 ) { return; }
    //replace avatars
    $( '.avatar' ).children('img').attr('src', 'http://image.prntscr.com/image/721623d483fc47cc8106e818028c165e.png');
    $('.userRibbons').find('i').attr('class', 'fa fa-rub');
    gimmick('body');
    }
    function gimmick(el) {
    var exists = document.getElementById('gimmick');
    if (exists) {
    exists.parentNode.removeChild(exists);
    return false;
    }
    var element = document.querySelector(el);
    var canvas = document.createElement('canvas'),
    ctx = canvas.getContext('2d'),
    focused = false;
    canvas.width = window.innerWidth;
    canvas.height = $(document).height();
    canvas.id = 'gimmick';
    var coin = new Image();
    coin.src = 'http://i.imgur.com/5ZW2MT3.png';
    // 440 wide, 40 high, 10 states
    coin.onload = function () {
    element.appendChild(canvas);
    focused = true;
    drawloop();
    };
    var coins = [];
    function drawloop() {
    if (focused) {
    requestAnimationFrame(drawloop);
    }
    ctx.clearRect(0, 0, canvas.width, canvas.height);
    if (Math.random() < .3) {
    coins.push({
    x: Math.random() * canvas.width | 0,
    y: -25,
    dy: 1,
    s: 0.5 + Math.random(),
    state: Math.random() * 10 | 0
    });
    }
    var i = coins.length;
    while (i--) {
    var x = coins[i].x;
    var y = coins[i].y;
    var s = coins[i].s;
    var state = coins[i].state;
    coins[i].state = (state > 9) ? 0 : state + 0.1;
    coins[i].dy += 0.05;
    coins[i].y += coins[i].dy;
    ctx.drawImage(coin, 44 * Math.floor(state), 0, 44, 40, x, y, 44 * s, 40 * s);
    if (y > canvas.height) {
    coins.splice(i, 1);
    }
    }
    }
    }
    50/50 chance this no longer works since I may have ripped the old CSS.
     
    • LOL LOL x 1
  2. ChrisTurk

    ChrisTurk Administrator

    Messages:
    56,724
    Ratings:
    +163,220
    • LOL LOL x 2
  3. eyeofodin

    eyeofodin Well-Known Turker

    Messages:
    2,772
    Gender:
    Male
    Ratings:
    +5,608
    Just finished watching Hocus Pocus... Only now realizing I should be calling @Totally Not , "Thackery" or "Binx"
     
    • Love Love x 1
  4. Totally Not Salem

    Totally Not Salem Survey Slinger

    Messages:
    5,664
    Gender:
    Male
    Ratings:
    +5,034
    Last edited: Nov 1, 2017
  5. Totally Not Salem

    Totally Not Salem Survey Slinger

    Messages:
    5,664
    Gender:
    Male
    Ratings:
    +5,034
    Fixed it so that the coins appear on top and don't interfere with normal interaction w/ the site:
    Code:
    // ==UserScript==
    // @name _THsss Thread Tools
    // @version 1.1
    // @description none
    // @author ChrisTurk (sb edit)
    // @include https://turkerhub.com/*
    // @grant GM_log
    // @require https://code.jquery.com/jquery-3.1.0.min.js
    // ==/UserScript==
    $( document ).ready(function(){ aprilFools(); });
    function aprilFools() {
    if ($('.loginText').length || $( '.crumb' ).text().indexOf('Daily mTurk') == -1 ) { return; }
    //replace avatars
    $( '.avatar' ).children('img').attr('src', 'http://image.prntscr.com/image/721623d483fc47cc8106e818028c165e.png');
    $('.userRibbons').find('i').attr('class', 'fa fa-rub');
    gimmick('body');
    }
    function gimmick(el) {
    var exists = document.getElementById('gimmick');
    if (exists) {
    exists.parentNode.removeChild(exists);
    return false;
    }
    var element = document.querySelector(el);
    var canvas = document.createElement('canvas'),
    ctx = canvas.getContext('2d'),
    focused = false;
    canvas.width = window.innerWidth;
    canvas.height = $(document).height();
    canvas.style.left = "0px";
    canvas.style.top = "0px";
    canvas.style.zIndex = Number.MAX_SAFE_INTEGER;
    canvas.style.position = "fixed";
    canvas.style.pointerEvents = "none";
    canvas.id = 'gimmick';
    var coin = new Image();
    coin.src = 'http://i.imgur.com/5ZW2MT3.png';
    // 440 wide, 40 high, 10 states
    coin.onload = function () {
    element.appendChild(canvas);
    focused = true;
    drawloop();
    };
    var coins = [];
    function drawloop() {
    if (focused) {
    requestAnimationFrame(drawloop);
    }
    ctx.clearRect(0, 0, canvas.width, canvas.height);
    if (Math.random() < 0.3) {
    coins.push({
    x: Math.random() * canvas.width | 0,
    y: -25,
    dy: 1,
    s: 0.5 + Math.random(),
    state: Math.random() * 10 | 0
    });
    }
    var i = coins.length;
    while (i--) {
    var x = coins[i].x;
    var y = coins[i].y;
    var s = coins[i].s;
    var state = coins[i].state;
    coins[i].state = (state > 9) ? 0 : state + 0.1;
    coins[i].dy += 0.05;
    coins[i].y += coins[i].dy;
    ctx.drawImage(coin, 44 * Math.floor(state), 0, 44, 40, x, y, 44 * s, 40 * s);
    if (y > canvas.height) {
    coins.splice(i, 1);
    }
    }
    }
    }
    The code you shared had them appearing in the footer.
     
    • LOL LOL x 1
  6. ChrisTurk

    ChrisTurk Administrator

    Messages:
    56,724
    Ratings:
    +163,220
    I'd like to assume it worked fine last year, but I think its funnier if it was broken for everyone and no one had the heart to break the bad news to me
     
    • LOL LOL x 3
  7. keysman

    keysman Well-Known Turker

    Messages:
    2,973
    Gender:
    Male
    Ratings:
    +11,718
    Title: 15 minute study, REQUIRES SMARTPHONE | PANDA
    Requester: Surveys [A3UZVHOLFVVAXW] (TO)
    TO Ratings:
    ★★★★ 1.00 Communicativity
    ★★★★★ 3.54 Generosity
    ★★★★★ 5.00 Fairness
    ★★★★ 4.88 Promptness
    Number of Reviews: 44 | TOS Flags: 0
    Submit a new TO review
    Description: -
    Time: 60 minutes
    HITs Available: 181
    Reward: $2.50
    Qualifications: Total approved HITs is not less than 1;HIT approval rate (%) is not less than 90;Location is US
     
    • Nom Nom Nom! Nom Nom Nom! x 1
    • 5/5 Pay 5/5 Pay x 1
  8. Totally Not Salem

    Totally Not Salem Survey Slinger

    Messages:
    5,664
    Gender:
    Male
    Ratings:
    +5,034
    Considering adding the coins to the wage flasher but too concerned about performance losses lol.
     
    • LOL LOL x 1
  9. eyeofodin

    eyeofodin Well-Known Turker

    Messages:
    2,772
    Gender:
    Male
    Ratings:
    +5,608
    Saturday... People do not hold back.
    [​IMG]
     
    • LOL LOL x 1
    • Love Love x 1
  10. Hummingbirdee

    Hummingbirdee Big Bird

    Messages:
    54,302
    Gender:
    Female
    Ratings:
    +115,710
    [​IMG]
     
    • Love Love x 1
  11. WimpLo

    WimpLo Survey Slingin' Batch Masta Former MTG MotM

    Messages:
    35,126
    Gender:
    Female
    Ratings:
    +75,028
    RA was online, you would have known. :emoji_sweat_smile:
     
    • LOL LOL x 1
  12. Momof1

    Momof1 Survey Slinger

    Messages:
    5,739
    Gender:
    Female
    Ratings:
    +5,912
    We have a turkey! I will miss George but he is cute. Is his name Tom? Tony? Thor? He looks like a Henry also.
     
    • Love Love x 1
  13. ChrisTurk

    ChrisTurk Administrator

    Messages:
    56,724
    Ratings:
    +163,220
    upload_2017-11-1_1-12-21.png
    Poll tomorrow.. or maybe I should ask for suggestions tomorrow and do a poll the next day :emoji_thinking:
     
    • Like Like x 2
    • LOL LOL x 2
  14. eyeofodin

    eyeofodin Well-Known Turker

    Messages:
    2,772
    Gender:
    Male
    Ratings:
    +5,608
    [​IMG]
     
    • LOL LOL x 1
  15. Momof1

    Momof1 Survey Slinger

    Messages:
    5,739
    Gender:
    Female
    Ratings:
    +5,912
    Chris you are his father so you should name him ..lol (but a poll would be fun)
     
  16. Melting Glacier

    Melting Glacier PE: $30.01 - That's over $1.25/hour! ┬┴┤( ͡° ͜ʖ├┬┴

    Messages:
    6,157
    Gender:
    Male
    Ratings:
    +11,423
    Was about to do the dibs call a little early.. does this mean you want it? :emoji_smiley_cat:
     
  17. GooseMcD

    GooseMcD Well-Known Turker

    Messages:
    1,694
    Gender:
    Female
    Ratings:
    +4,286
    [​IMG]
     
    • LOL LOL x 1
  18. Hummingbirdee

    Hummingbirdee Big Bird

    Messages:
    54,302
    Gender:
    Female
    Ratings:
    +115,710
    Additional Poll: Will Bird ever get her two lost packages that were "delivered?" Or is a postal employee somewhere in a bathtub full of cat litter, drinking watermelon perrier, screaming "YAASSSSSSSS!"
     
    • LOL LOL x 2
  19. ChrisTurk

    ChrisTurk Administrator

    Messages:
    56,724
    Ratings:
    +163,220
    Its 1st of the month homie.
     
  20. ChrisTurk

    ChrisTurk Administrator

    Messages:
    56,724
    Ratings:
    +163,220
    Actually, I don't need it and I prefer not doing it anyway, I can just send you the bbcode for the stats & you can do your thing. Win for meeeeeeeeee
     
Thread Status:
Not open for further replies.