// ==UserScript==
// @name No HIT Reloader
// @namespace http://kadauchi.com/
// @version 1.0.0
// @description Reloads pages automatically if no HIT is loaded for provided GroupIds.
// @author Kadauchi
// @icon http://kadauchi.com/avatar.jpg
// @include https://www.mturk.com/mturk/previewandaccept*
// @include https://www.mturk.com/mturk/accept*
// @include https://www.mturk.com/mturk/preview*
// @grant GM_log
// @require https://code.jquery.com/jquery-2.1.4.min.js
// ==/UserScript==
// Add the group id for the HITs you want to be reloaded here.
var GroupID = [
"372BFDRITDWG830EQNGKBX9BAFJ1C0", //A9
"3WY138MABEE4BCXHUMJF0NIGU5JYI4", //A9
"3D00S7P7YGMS0X50UPV7TFTQ47DZEI" //A9
];
console.log("The script [No HIT Reloader] has been loaded.");
if (!$("iframe").length){
for (var i = 0; i < GroupID.length; i++){
if (window.location.href.indexOf(GroupID[i]) !== -1){
location.reload();
}
}
}
else {
document.title = "HIT Loaded";
}