[MTURK] Queue Header Link

Adds a link to your HITs queue into the MTurk header on worker site.

  1. // ==UserScript==
  2. // @name [MTURK] Queue Header Link
  3. // @namespace https://greasyfork.org/en/users/150063-trickydude24
  4. // @description Adds a link to your HITs queue into the MTurk header on worker site.
  5. // @author Trickydude24
  6. // @version 3.1
  7. // @match https://worker.mturk.com/*
  8. // @match https://www.mturk.com/mturk/dashboard*
  9. // @exclude https://*.mturk.com/direct_deposit*
  10. // @exclude https://*.mturk.com/payment_schedule*
  11. // @grant none
  12. // ==/UserScript==
  13.  
  14. // Worker Site - Dashboard & Earnings Page//
  15. if ((/^https?:\/\/(www\.)?worker\.mturk\.com\/dashboard.*/.test(location.href))||(/^https?:\/\/(www\.)?worker\.mturk\.com\/earnings.*/.test(location.href))) {
  16. $(".nav.navbar-nav.hidden-xs-down").append('<li class="nav-item"><a class="nav-link" href="https://worker.mturk.com/tasks">HITs Queue</a></li>');
  17. }
  18.  
  19. // Worker Site - HIT Pages (Accepted and Preview pages) //
  20. else if (/^https?:\/\/(www\.)?worker\.mturk\.com\/.*/.test(location.href)) {
  21. if ($(".nav.navbar-nav.hidden-xs-down")[0]){
  22. // HIT is in PREVIEW mode
  23. $(".nav.navbar-nav.hidden-xs-down").append('<li class="nav-item"><a class="nav-link" href="https://worker.mturk.com/tasks">HITs Queue</a></li>');
  24. }
  25. else {
  26. // HIT is ACCEPTED
  27. $(".col-xs-12.navbar-content a:first-child:first").after('<span style="margin: 0;"><a class="nav-link" href="https://worker.mturk.com/tasks">HITs Queue</a></span>');
  28. }
  29. }