Mturk Worker Userscripts

Fanugi

New Member
Joined
Sep 6, 2016
Messages
52
Reaction score
15
Points
208
Gender
Male
What is everyone going to do in the meantime without HITDB? It's critical for me as I have a bad memory and anxiety about duplicating HITS (and possible rejections). I exported to CSV last night but now I have to search that every time (before doing a HIT) and add to it at the end of each day (with completed HITS from the day)? Any ideas?
 

lmhilly

New Member
Joined
Mar 23, 2016
Messages
9
Reaction score
7
Points
203
Gender
Female
  • Like
Reactions: kattkatt

ChristopherASA

Well-Known Member
Contributor
Joined
Feb 18, 2016
Messages
11,716
Reaction score
23,143
Points
1,238
Age
77
Location
Wish it were Seattle,but it isn't. :(
Gender
Male
This should be updated today. Took me a bit to find space for the buttons on the hit list page. The buttons will be in the show details of the hit.
The queue helper will take more time and not sure if it can have all the options it has now on www.
So is "helper" working? I can't see it on the new site. and it's an excruciatingly important little script.
 

Johnnyrs

Active Member
Contributor
Crowd Pleaser
Joined
Jan 12, 2016
Messages
546
Reaction score
1,603
Points
668
Age
54
Location
Whittier, California
Gender
Male
So is "helper" working? I can't see it on the new site. and it's an excruciatingly important little script.
Yes the helper works and does show buttons when there is a hit available. If there I no hit then no buttons because it gets redirected and does not show the group ID. I placed the buttons in the details section on the projects page so have to open up each hit or just click on the show details at top. As long as you have Panda Crazy working on worker.mturk.com page then the buttons should show up. The old url only works with the old site and will not show the buttons on the new site.
 

ChristopherASA

Well-Known Member
Contributor
Joined
Feb 18, 2016
Messages
11,716
Reaction score
23,143
Points
1,238
Age
77
Location
Wish it were Seattle,but it isn't. :(
Gender
Male
Yes the helper works and does show buttons when there is a hit available. If there I no hit then no buttons because it gets redirected and does not show the group ID. I placed the buttons in the details section on the projects page so have to open up each hit or just click on the show details at top. As long as you have Panda Crazy working on worker.mturk.com page then the buttons should show up. The old url only works with the old site and will not show the buttons on the new site.
Redirected by AMT, right? If so, why do they do that, the ninnies? And thanks for getting back to me so quickly, Johnnyrs @Johnnyrs !!.
 

Johnnyrs

Active Member
Contributor
Crowd Pleaser
Joined
Jan 12, 2016
Messages
546
Reaction score
1,603
Points
668
Age
54
Location
Whittier, California
Gender
Male
Redirected by AMT, right? If so, why do they do that, the ninnies? And thanks for getting back to me so quickly, Johnnyrs @Johnnyrs !!.
Yes mturk redirects on their servers so the browser doesn't even know the original url. My guess is they thought people would want to see other hits from that requester but it's really useless to redirect. Not sure if they did it to stop the refreshing of panda links because they have PRE's and throttling for that. So just hope they get enough complaints about it that they change it.
 
  • Like
Reactions: Kadauchi

Johnnyrs

Active Member
Contributor
Crowd Pleaser
Joined
Jan 12, 2016
Messages
546
Reaction score
1,603
Points
668
Age
54
Location
Whittier, California
Gender
Male
What is everyone going to do in the meantime without HITDB? It's critical for me as I have a bad memory and anxiety about duplicating HITS (and possible rejections). I exported to CSV last night but now I have to search that every time (before doing a HIT) and add to it at the end of each day (with completed HITS from the day)? Any ideas?
OK. because I use this script a lot and important for my documentation I checked to see if this could be used on the old site still. It does but needs to have 5 lines changed in the current version of MTurk HIT Database Mk.II:
Code:
187:          var payload = { encodedDate: _date, pageNumber: 1, sortType: "All", "doNotRedirect": "true" };
215:          payload = { encodedDate: d, pageNumber: 1, sortType: "All", "doNotRedirect": "true" };
279:          var payload = { encodedDate: _date, pageNumber: +_page+1, sortType: "All", "doNotRedirect": "true" };
306:        var payload = { encodedDate: _decDate(Utils.ISODate(_d)), pageNumber: 1, sortType: "All", "doNotRedirect": "true" };
918:        HITStorage.fetch(MTURK_BASE+"status?doNotRedirect=true");
So if you're confident in changing lines in scripts you can change the numbered lines above and it will work on the old site with this url: https://www.mturk.com/mturk/dashboard?doNotRedirect=true

Should give the original author time to update it for the new site I hope. It's a big script so it's going to take some time.
 

kjsgirl

New Member
Joined
Oct 27, 2016
Messages
18
Reaction score
13
Points
203
Age
45
Gender
Female
This is amazingly helpful! I have been so sad about not seeing pending and weekly earnings and my database history. Thank you so much. This is a HUGE help until all the other coding is done. You all are awesome.
 

Caturk

Alias PizzaCat
Joined
Oct 29, 2016
Messages
1,281
Reaction score
742
Points
363
Location
NYS
Gender
Female
Yes mturk redirects on their servers so the browser doesn't even know the original url. My guess is they thought people would want to see other hits from that requester but it's really useless to redirect. Not sure if they did it to stop the refreshing of panda links because they have PRE's and throttling for that. So just hope they get enough complaints about it that they change it.
Some Masters people are planning to email Amazon about deficiencies. It can't hurt.
 

electrolyte

The Ghost of MTurk Past
Contributor
Joined
Jan 10, 2016
Messages
19,184
Reaction score
45,979
Points
1,313
Some Masters people are planning to email Amazon about deficiencies. It can't hurt.
I'd encourage anyone with concerns, definitely not just Masters workers, to email them and articulate not only what the problem is but why it's a problem in your workflow.
 

Fanugi

New Member
Joined
Sep 6, 2016
Messages
52
Reaction score
15
Points
208
Gender
Male
OK. because I use this script a lot and important for my documentation I checked to see if this could be used on the old site still. It does but needs to have 5 lines changed in the current version of MTurk HIT Database Mk.II:
Code:
187:          var payload = { encodedDate: _date, pageNumber: 1, sortType: "All", "doNotRedirect": "true" };
215:          payload = { encodedDate: d, pageNumber: 1, sortType: "All", "doNotRedirect": "true" };
279:          var payload = { encodedDate: _date, pageNumber: +_page+1, sortType: "All", "doNotRedirect": "true" };
306:        var payload = { encodedDate: _decDate(Utils.ISODate(_d)), pageNumber: 1, sortType: "All", "doNotRedirect": "true" };
918:        HITStorage.fetch(MTURK_BASE+"status?doNotRedirect=true");
So if you're confident in changing lines in scripts you can change the numbered lines above and it will work on the old site with this url: https://www.mturk.com/mturk/dashboard?doNotRedirect=true

Should give the original author time to update it for the new site I hope. It's a big script so it's going to take some time.
This is something like an early Christmas miracle for me right now. Thank you so very much.
 

Caturk

Alias PizzaCat
Joined
Oct 29, 2016
Messages
1,281
Reaction score
742
Points
363
Location
NYS
Gender
Female
NVM
 
Last edited:

klyde

No, I don't want to see your pog collection
Contributor
Joined
Mar 24, 2016
Messages
3,302
Reaction score
5,497
Points
838
Gender
Male
I'd encourage anyone with concerns, definitely not just Masters workers, to email them and articulate not only what the problem is but why it's a problem in your workflow.
Here is the feedback link. It's at the very bottom. Also when I sent feedback, this is what I got. If enough people do it I think we have a change.

 

DONNA WISE

New Member
Joined
Dec 16, 2017
Messages
1
Reaction score
4
Points
1
Age
73
Gender
Female
This should be updated today. Took me a bit to find space for the buttons on the hit list page. The buttons will be in the show details of the hit.
The queue helper will take more time and not sure if it can have all the options it has now on www.
how in the world do you make that much? if I get $5 a day it is a lot ????
 
  • Like
Reactions: Azazael

electrolyte

The Ghost of MTurk Past
Contributor
Joined
Jan 10, 2016
Messages
19,184
Reaction score
45,979
Points
1,313
This script was shared with me and with the creator's permission, I'm sharing it here:

Show HIT Details on Tasks page

Log in or register now. to view Spoiler content!

Log in or register now. to view Spoiler content!

Script:

Code:
// ==UserScript==
// @name         Show HIT Details on Tasks page
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Add details for HITs on the detail status bar
// @author       JRB
// @match        https://worker.mturk.com/projects/*/tasks*
// @grant        none
// ==/UserScript==

function getElementsByXPath(xpath, parent)
{
  let results = [];
  let query = document.evaluate(xpath,
      parent || document,
      null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
  for (let i=0, length=query.snapshotLength; i<length; ++i) {
    results.push(query.snapshotItem(i));
  }
  return results;
}

function formatDate(date) {
  var monthNames = [
    "January", "February", "March",
    "April", "May", "June", "July",
    "August", "September", "October",
    "November", "December"
  ];

  var day = date.getDate();
  var monthIndex = date.getMonth();
  var year = date.getFullYear();

  return day + ' ' + monthNames[monthIndex] + ' ' + year;
}

(function() {
    'use strict';

    var hitDetailsLink = getElementsByXPath("//a[text()='HIT Details']")[0];
    var hitDetailsParent = hitDetailsLink.parentElement;
    var hitModalData = JSON.parse(hitDetailsParent.getAttribute("data-react-props"));

    var detailBarRow = getElementsByXPath("//div[contains(@class, 'project-detail-bar')]/div[contains(@class, 'row')]")[0];

    var numAssignableHITs = hitModalData.modalOptions.assignableHitsCount;
    var requesterName = hitModalData.modalOptions.requesterName;
    var projectTitle = hitModalData.modalOptions.projectTitle;
    var timeAllotted = Math.round(hitModalData.modalOptions.assignmentDurationInSeconds / 60);
    var expirationTime = formatDate(new Date(hitModalData.modalOptions.expirationTime));
    var contactRequesterLink = hitModalData.modalOptions.contactRequesterUrl;

    var myDiv = document.createElement('div');
    myDiv.className = "col-md-12 col-xs-12";
    myDiv.innerHTML = '<span class="detail-bar-label">Requester Name: </span><span class="detail-bar-value"><a href="' + contactRequesterLink + '" target="_blank">' + requesterName + '</a></span>';
    myDiv.innerHTML += '&nbsp;&nbsp;<span class="detail-bar-label">HITs Available: </span><span class="detail-bar-value">' + numAssignableHITs + '</span>';
    myDiv.innerHTML += '&nbsp;&nbsp;<span class="detail-bar-label">HIT Title: </span><span class="detail-bar-value">' + projectTitle + '</span>';
    myDiv.innerHTML += '&nbsp;&nbsp;<span class="detail-bar-label">Time Allotted: </span><span class="detail-bar-value">' + timeAllotted + ' Min</span>';
    myDiv.innerHTML += '&nbsp;&nbsp;<span class="detail-bar-label">Expires: </span><span class="detail-bar-value">' + expirationTime + '</span>';
    detailBarRow.append(myDiv);
})();
 
Last edited:
D

Deleted member 481

Guest
EDIT: Not working right now. On hold as the creator fixes it.


This script was shared with me and with the creator's permission, I'm sharing it here:

Show HIT Details on Tasks page

Log in or register now. to view Spoiler content!

Log in or register now. to view Spoiler content!

Script:

Code:
// ==UserScript==
// @name         Show HIT Details on Tasks page
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Add details for HITs on the detail status bar
// @author       JRB
// @match        https://worker.mturk.com/projects/*/tasks*
// @grant        none
// ==/UserScript==

function getElementsByXPath(xpath, parent)
{
  let results = [];
  let query = document.evaluate(xpath,
      parent || document,
      null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
  for (let i=0, length=query.snapshotLength; i<length; ++i) {
    results.push(query.snapshotItem(i));
  }
  return results;
}

function formatDate(date) {
  var monthNames = [
    "January", "February", "March",
    "April", "May", "June", "July",
    "August", "September", "October",
    "November", "December"
  ];

  var day = date.getDate();
  var monthIndex = date.getMonth();
  var year = date.getFullYear();

  return day + ' ' + monthNames[monthIndex] + ' ' + year;
}

(function() {
    'use strict';

    var hitDetailsLink = getElementsByXPath("/html/body/div[4]/div[2]/div/div[1]/div/a")[0];
    var hitDetailsParent = hitDetailsLink.parentElement;
    var hitModalData = JSON.parse(hitDetailsParent.getAttribute("data-react-props"));

    var detailBarRow = getElementsByXPath("/html/body/div[4]/div[2]/div")[0];

    var numAssignableHITs = hitModalData.modalOptions.assignableHitsCount;
    var requesterName = hitModalData.modalOptions.requesterName;
    var projectTitle = hitModalData.modalOptions.projectTitle;
    var timeAllotted = Math.round(hitModalData.modalOptions.assignmentDurationInSeconds / 60);
    var expirationTime = formatDate(new Date(hitModalData.modalOptions.expirationTime));
    var contactRequesterLink = hitModalData.modalOptions.contactRequesterUrl;

    var myDiv = document.createElement('div');
    myDiv.className = "col-md-12 col-xs-12";
    myDiv.innerHTML = '<span class="detail-bar-label">Requester Name: </span><span class="detail-bar-value"><a href="' + contactRequesterLink + '" target="_blank">' + requesterName + '</a></span>';
    myDiv.innerHTML += '&nbsp;&nbsp;<span class="detail-bar-label">HITs Available: </span><span class="detail-bar-value">' + numAssignableHITs + '</span>';
    myDiv.innerHTML += '&nbsp;&nbsp;<span class="detail-bar-label">HIT Title: </span><span class="detail-bar-value">' + projectTitle + '</span>';
    myDiv.innerHTML += '&nbsp;&nbsp;<span class="detail-bar-label">Time Allotted: </span><span class="detail-bar-value">' + timeAllotted + ' Min</span>';
    myDiv.innerHTML += '&nbsp;&nbsp;<span class="detail-bar-label">Expires: </span><span class="detail-bar-value">' + expirationTime + '</span>';
    detailBarRow.append(myDiv);
})();
When clicking the requester's name, anyway to change that to a requester search page? It just opens a new tab & sends me to the same hit.
 

electrolyte

The Ghost of MTurk Past
Contributor
Joined
Jan 10, 2016
Messages
19,184
Reaction score
45,979
Points
1,313
When clicking the requester's name, anyway to change that to a requester search page? It just opens a new tab & sends me to the same hit.
I have the script off that you're replying to because as I wrote at the top, the creator said it's temporarily not working and needs some bug fixes first.

However, if you have MTS on, when you click on the requester's name, it pops up the HIT Details box. The requester's name in that HIT Details box is a clickable link that goes to the search page for the requester. Does that work for you?
 
D

Deleted member 481

Guest
I have the script off that you're replying to because as I wrote at the top, the creator said it's temporarily not working and needs some bug fixes first.

However, if you have MTS on, when you click on the requester's name, it pops up the HIT Details box. The requester's name in that HIT Details box is a clickable link that goes to the search page for the requester. Does that work for you?
Hit details box pops up, but name isn't clickable in popup.