// ==UserScript== // @name Block Individual Requests // @author Turksquatch // @version 0.0.5 // @namespace http://www.turksquatch.com/ // @homepage http://mturkforum.com/showthread.php?4441-New-Script-to-Block-Individual-Hits&p=56939 // @description Hide individual HITs you're not interested in. // @include https://www.mturk.com/mturk/findhits* // @include https://www.mturk.com/mturk/searchbar* // @include https://www.mturk.com/mturk/viewsearchbar* // @include https://www.mturk.com/mturk/sortsearchbar* // @include https://www.mturk.com/mturk/sorthits* // @include https://www.mturk.com/mturk/viewhits* // @downloadURL none // ==/UserScript== requestIndex = GM_getValue("requestIndex"); if(!requestIndex) { //alert(requestIndex); requestIndex=""; GM_setValue("requestIndex",""); } function showUpdates() { updated = GM_getValue('requestUpdated'); if (updated) { tables = document.evaluate("//table",document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null); table = tables.snapshotItem(6); action = updated.split(','); rId = action[1].split('::')[0]; rName = action[1].split('::')[1]; div = document.createElement('div'); div.id = 'updated'; status = "
"; table.parentNode.insertBefore(div, table); GM_deleteValue('requestUpdated'); } } function hideHIT(element) { pa=element, step=0; while (step++ < 11) { ch = pa; pa = pa.parentNode; } pa.className = "rblocked"; } function unhideHIT(element) { pa=element, step=0; while (step++ < 11) { ch = pa; pa = pa.parentNode; } pa.className = ""; } function hideMatchingHITs() { var numBlocked=0; theseRequests = document.evaluate("//a[starts-with(@href,'/mturk/preview?groupId=')]",document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null); for (i=0; i