[Script] TurkerHub xPort

Discussion in 'mTurk Scripts & Resources' started by ChrisTurk, Dec 2, 2016.

  1. Kadauchi

    Kadauchi Administrator Former MTG MotM

    Messages:
    4,367
    Ratings:
    +8,589
    Oh and @ChrisTurk, nothing changes functionally but,

    var thisReq = $(this).attr('data-requester');

    ==

    var thisReq = $(this).data('requester');

    in case you didn't know.
     
    • Today I Learned Today I Learned x 1
  2. ChrisTurk

    ChrisTurk Administrator

    Messages:
    56,679
    Ratings:
    +162,927
    I did not.. Actually I'm sure if you look at the script you can see where I learned about some new functions mid-way through making it because I started using them more LOL (.get is a good example, dropped the method tag after 2 functions or w/e lol). This is definitely part of the 'using the command' versus 'understanding the functionality of it.' :nod:

    Part of my weekend project is going through and standardizing it.. aka rewriting it to not be duct tape & string.

    Gotta learn somehow.. guinea pigging all the fine folks here is my jam. :madscientistemojiwedon'thave:
     
  3. Kadauchi

    Kadauchi Administrator Former MTG MotM

    Messages:
    4,367
    Ratings:
    +8,589
    Lol, yeah I can see it. I'll be available all weekend working on turkplus to get it up to day with my new way of coding since its all old so if you need help/someone to bounce ideas off of I'll be around. Do you guys have an IRC or anything?
     
  4. Kadauchi

    Kadauchi Administrator Former MTG MotM

    Messages:
    4,367
    Ratings:
    +8,589
    @ChrisTurk If you can't tell, I'm avoid work by looking over your script lol.

    For the TO coloring, instead of running it 4 times, you could do something like this instead.
    Code:
    const toformat = (type, rating) => {
      let color = 'red';
      if (rating >= 4.00) { color = 'green'; }
      else if (rating >= 3.00) { color = 'yellow'; }
      else if (rating >= 2.00) { color = 'orange'; }
      else if (rating === 'N/A') { color = 'grey'; }
      return `[b][${type}: [color=${color}]${rating}[/color]][/b]`;
    };
    
    // Call it like this
    toTemplate += toformat('Comm', comm);
    toTemplate += toformat('Pay', pay);
    toTemplate += toformat('Fair', fair);
    toTemplate += toformat('Fast', fast);
    
     
  5. Randomacts

    Randomacts Survey Slinger

    Messages:
    94,622
    Gender:
    Male
    Ratings:
    +124,073
    I still haven't been able to get the script to work... I wonder if there is an issue with my password being too long or having escape characters in it.
     
  6. Kadauchi

    Kadauchi Administrator Former MTG MotM

    Messages:
    4,367
    Ratings:
    +8,589
    Did you try var password = encodeURIComponent(password);
     
    • Today I Learned Today I Learned x 2
  7. Randomacts

    Randomacts Survey Slinger

    Messages:
    94,622
    Gender:
    Male
    Ratings:
    +124,073
    You mean change

    Code:
    /* CHANGE THESE VALUES */
    var user = 'forumUsername';
    var pass = 'forumPassword';
    To


    Code:
    /* CHANGE THESE VALUES */
    var user = 'forumUsername';
    var pass = encodeURIComponent('forumPassword');
    or am I just being stupid as usual?


    Edit: looks like that worked... @ChrisTurk you might want to have it change to this in case other people besides me have long complex passwords with escape characters.
     
    • Today I Learned Today I Learned x 1
  8. ChrisTurk

    ChrisTurk Administrator

    Messages:
    56,679
    Ratings:
    +162,927
    Noted & done for Sunday's update.
     
  9. Randomacts

    Randomacts Survey Slinger

    Messages:
    94,622
    Gender:
    Male
    Ratings:
    +124,073
    If I understand it correctly.. technically you could use the same thing for the user variable.. it just would be pointless seeing as nobody has usernames with escape characters
     
  10. ChrisTurk

    ChrisTurk Administrator

    Messages:
    56,679
    Ratings:
    +162,927
    Better safe than sorry at this point, lol.
     
    • Like Like x 1
  11. Randomacts

    Randomacts Survey Slinger

    Messages:
    94,622
    Gender:
    Male
    Ratings:
    +124,073

    Hello my name is
    Code:
    Cb&X:PJwsFN3*c~#U17AfBRPAgXRnAHaoMQED9*9qk$zl^+&
    nice to meet you.


    (It would be amusing if we used keepass to generate our usernames)

    Edit: I had to put it in code brackets or it would make a smiley in the name lol
     
  12. Kadauchi

    Kadauchi Administrator Former MTG MotM

    Messages:
    4,367
    Ratings:
    +8,589
    Ok cool. And you should be able to use [ plain]:p[/plain ] instead of code brackets like so :P
     
  13. Randomacts

    Randomacts Survey Slinger

    Messages:
    94,622
    Gender:
    Male
    Ratings:
    +124,073

    Uh I don't think that worked man.. I just see a smiley ;)
     
    • Like Like x 1
  14. ceedj

    ceedj Survey Slinger

    Messages:
    2,767
    Gender:
    Male
    Ratings:
    +6,020
    Ok, got it to show up on the search list, so that works. Still have plans to add support for accepted hits? I use HS and HM for smaller/batch HITs, while I use a search on TM for bigger stuff.

    Great work, looks good! :)
     
  15. Mozzie

    Mozzie Turker

    Messages:
    92
    Gender:
    Female
    Ratings:
    +111
    I see the button on mturk, but it is not showing up on HS for me. I am using Chrome. Could I be using the wrong version of HS?
     
  16. Tjololo

    Tjololo Active Turker

    Messages:
    405
    Ratings:
    +1,272
    Super neat script! One gripe, you forgot a colon after "Reward". Just a minor thing though.
     
    • Today I Learned Today I Learned x 1