[MTURK] Queue Header Link

Adds a link to your HITs queue into the MTurk header on worker site [www deprecated].

当前为 2017-12-14 提交的版本,查看 最新版本

  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 [www deprecated].
  5. // @author Trickydude24
  6. // @version 2.0
  7. // @match https://worker.mturk.com/*
  8. // @match https://www.mturk.com/mturk/dashboard*
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. // Worker Site - Dashboard & Earnings Page//
  13. if ((/^https?:\/\/(www\.)?worker\.mturk\.com\/dashboard.*/.test(location.href))||(/^https?:\/\/(www\.)?worker\.mturk\.com\/earnings.*/.test(location.href))) {
  14. $(".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>');
  15. }
  16.  
  17. // Worker Site - HIT Pages (Accepted and Preview pages) //
  18. else if (/^https?:\/\/(www\.)?worker\.mturk\.com\/projects\/.*/.test(location.href)) {
  19. if ($(".nav.navbar-nav.hidden-xs-down")[0]){
  20. // HIT is in PREVIEW mode
  21. $(".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>');
  22. }
  23. else {
  24. // HIT is ACCEPTED
  25. $(".col-xs-12.navbar-content a:first-child:first").after('<span style="margin: 0 40px;"><a class="nav-link" href="https://worker.mturk.com/tasks">HITs Queue</a></span>');
  26. }
  27. }
  28.  
  29.  
  30. // Old WWW Site //
  31. else if (/^https?:\/\/(www\.)?mturk\.com\/mturk\/dashboard.*/.test(location.href)) {
  32. var theDiv = document.getElementById('subtabs');
  33. theDiv.innerHTML += '<span class="almostblack_text">&nbsp;|&nbsp;</span><a href="/mturk/myhits" class="subnavclass">HITs Queue</a>';
  34. }