// ==UserScript== // @name HIT Forker // @version 0.1.2 // @description Monitors mturk.com for HITs // @author ThisPoorGuy // @icon http://nopurpose.org/stuff/avatars/Lj21396.gif // @include https://worker.mturk.com/?finder_beta // @include https://www.mturk.com/mturk/findhits?match=true?finder_beta // @grant GM_log // @grant GM_setClipboard // @require https://code.jquery.com/jquery-3.1.0.min.js // @namespace https://greasyfork.org/users/163167 // @downloadURL none // ==/UserScript== // Acknowledgements // The core of this script was forked/stolen/adapted from Kadauchi's Hit Finder Beta script // Changelog // 0.1.2 - Fixed an issue with HITs that have double quotes in the title not working with the ignore hit by title button. I think. // 0.1.1 - Cleaned up the header, removed unused audio files // 0.1.0 - Made modifications to launch links with worker website. Added buttons to send information to PandaCrazy directly instead of copying link // TODO: // Remove www code // Clean up interface var worker = document.URL.match(/https:\/\/worker.mturk.com\//) ? true : false; var _config = JSON.parse(localStorage.getItem('_finder')) || {}; var blocklist = JSON.parse(localStorage.getItem('_finder_bl')) || {}; var includelist = JSON.parse(localStorage.getItem('_finder_il')) || {}; // Compatability check if (_config.version !== '1.1') { _config = {}; } var config = { version : _config.version || '1.1', delay : _config.delay || '3', type : _config.type || 'LastUpdatedTime%3A1&pageSize=', size : _config.size || '25', rew : _config.rew || '0.00', avail : _config.avail || '0', mto : _config.mto || '0.00', alert : _config.alert || '0', qual : _config.hasOwnProperty('qual') ? _config.qual : true, new : _config.hasOwnProperty('new') ? _config.new : true, newaudio : _config.newaudio || 'beep', pb : _config.hasOwnProperty('pb') ? _config.pb : false, to : _config.hasOwnProperty('to') ? _config.to : true, nl : _config.hasOwnProperty('nl') ? _config.nl : false, bl : _config.hasOwnProperty('bl') ? _config.bl : false, m : _config.hasOwnProperty('m') ? _config.m : false, push : _config.push || 'access_token_here', theme : _config.theme || 'default', custom : _config.custom || {main: 'FFFFFF', primary: 'CCCCCC', secondary: '111111', text: '000000', link: '0000EE', visited: '551A8B', prop : false}, to_theme : _config.to_theme || '1' }; var themes = { 'default' : {main: 'F2F2F2', primary: 'CCCCCC', secondary: '111111', text: '000000', link: '0000EE', visited: '551A8B', prop : true}, 'dark' : {main: '404040', primary: '666666', secondary: 'FFFFFF', text: 'FFFFFF', link: 'FFFFFF', visited: 'B3B3B3', prop : true}, 'darker' : {main: '000000', primary: '262626', secondary: 'FFFFFF', text: 'FFFFFF', link: 'FFFFFF', visited: 'B3B3B3', prop : true}, 'custom' : config.custom }; var hitdb = { db: null }; window.indexedDB.open('HITDB').onsuccess = function() { hitdb.db = this.result; }; var searches = 0, logged = 0, hitlog = {}, noti_delay = [], push_delay = []; // Adjust stuff depending on what site we are on. var url, upd, num, rew, minrew, searchqual; if (!worker) { url = 'https://www.mturk.com/mturk/searchbar?selectedSearchType=hitgroups&sortType='; upd = 'LastUpdatedTime%3A1&pageSize='; num = 'NumHITs%3A1&pageSize='; rew = 'Reward%3A1&pageSize='; minrew = '&minReward='; searchqual = '&qualifiedFor='; } else { url = 'https://worker.mturk.com/?'; upd = '&sort=updated_desc&page_size='; num = '&sort=num_hits_desc&page_size='; rew = '&sort=reward_desc&page_size='; minrew = '&filters%5Bmin_reward%5D='; searchqual = '&filters%5Bqualified='; } $('head').html( '