[MTURK] Queue Header Link

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

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         [MTURK] Queue Header Link
// @namespace    https://greasyfork.org/en/users/150063-trickydude24
// @description  Adds a link to your HITs queue into the MTurk header on worker site.
// @author       Trickydude24
// @version      3.1
// @match        https://worker.mturk.com/*
// @match        https://www.mturk.com/mturk/dashboard*
// @exclude      https://*.mturk.com/direct_deposit*
// @exclude      https://*.mturk.com/payment_schedule*
// @grant        none
// ==/UserScript==

// Worker Site - Dashboard & Earnings Page//
if ((/^https?:\/\/(www\.)?worker\.mturk\.com\/dashboard.*/.test(location.href))||(/^https?:\/\/(www\.)?worker\.mturk\.com\/earnings.*/.test(location.href))) {
           $(".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>');
}

// Worker Site - HIT Pages (Accepted and Preview pages) //
else if (/^https?:\/\/(www\.)?worker\.mturk\.com\/.*/.test(location.href)) {
    if ($(".nav.navbar-nav.hidden-xs-down")[0]){
    // HIT is in PREVIEW mode
        $(".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>');
    }
    else {
    // HIT is ACCEPTED
    $(".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>');
           }
     }