您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Shows the number of hits you have accepted on Dashboard and also a link to HIT scraper.
当前为
// ==UserScript== // @name HITs Accepted/HIT Scraper Link on Dashboard // @namespace http://ericfraze.com // @version 0.2 // @description Shows the number of hits you have accepted on Dashboard and also a link to HIT scraper. // @author Eric Fraze // @match https://www.mturk.com/mturk/* // @grant none // ==/UserScript== var hitsAssigned = "N/A (there was an error or something, contact Magnilucent if it happens a lot)"; url = window.location.href; if ( url.indexOf("dashboard") !== -1 ) { $.ajax({ url: "https://www.mturk.com/mturk/myhits", dataType: "html", success: function(data) { if ( $("td:contains('There are currently no HITs assigned to you.')", data).length ) { hitsAssigned = 0; }else{ var text = $("td.title_orange_text[style='white-space: nowrap; padding-top: 1ex;']", data).text(); var regstring = /(\d{1,2})(\sResults)/; var reg = new RegExp(regstring); var groups = reg.exec(text); hitsAssigned = groups[1]; } } }); } $(document).ready(function() { if ( $("td:contains('Your HIT Status')").length ) { $("#subtabs a:contains('Introduction')").attr("href", "https://www.mturk.com/mturk/findhits?match=true?hit_scraper"); $("#subtabs a:contains('Introduction')").text("HIT Scraper"); $("td:contains('Your HIT Status')").parents("table").find(".container-content").prepend('<table class="metrics-table" width="100%"><tbody><tr class="metrics-table-header-row"><th class="metrics-table-first-header">HITs Assigned to You</th></tr><tr class="even"><td class="metrics-table-first-value">' + hitsAssigned + '</td></tr></tbody></table>'); }else{ $("#subtabs").prepend("<a class='subnavclass' href='https://www.mturk.com/mturk/findhits?match=true?hit_scraper'>HIT Scraper</a><span class='almostblack_text'> | </span>"); } });