EDIT: 2/19/2018 - This script is now obsolete. I'll leave it posted for anyone who wants to learn off of it.
Ok, not sure what to call it, but for now, it's HIT Page Improvements, and not the much voted upon Crap That took WAY too long.
This script hopes to improve the Amazon Mechanical Turk user experience, in ways that the company themselves is not likely to achieve. In this script, the HITs available amount and a (working!) contact requester link is on the HIT page itself, accepted or not. Nothing major here, just some fancy (for me) fiddling with strings. Any other ideas may get slapped onto this in the future, but for now, enjoy!
Code:
// ==UserScript==
// @name
HIT Page Improvements
// @namespace
None
// @version
1.1
// @description
Go back to Toronto! I'M FROM WINNIPEG YOU IDIOT!
// @author
ceedj
// @include
*.mturkcontent.com/*
// @include
https://worker.mturk.com/projects*
// @grant
GM_log
// @require
https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js
// ==/UserScript==
$(document).ready(function(){
var tempStart = $("div[data-react-props]").prop('outerHTML');
var tempStart1 = (tempStart) ? tempStart.split("assignableHitsCount")[1]: "";
var tempSearch1 = (tempStart1) ? tempStart1.split(",")[0]: "";
var HITsLeft = (tempSearch1).slice(7);
var tempStart2 = $("div[data-react-props]").prop('outerHTML');
var tempStart3 = (tempStart2) ? tempStart2.split("contactRequesterUrl")[1]: "";
var tempSearch2 = (tempStart3) ? tempStart3.split(",")[0]: "";
var tempSearch3 = (tempSearch2).slice(13, -6);
var tempSearch4 = (tempSearch3).replace(/u0026/g,"");
var ReqUrl = (tempSearch4).replace(/\\/g,'&');
$("span[class='detail-bar-value']:first").append($("<div class='col-xs-5 col-md-6 text-md-right'>").append($("<a href='" + ReqUrl + "' target='_blank'/>").html("Contact Requester")));//Contact
$("span[class='detail-bar-value']:last").append($("<div class='col-xs-5 col-md-6 text-md-right'>").html("HITs Available: ").append(HITsLeft));//HITs
});