HideReject

Hides rejections

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         HideReject
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Hides rejections
// @author       Aesric
// @match        https://worker.mturk.com/dashboard*
// @grant        none
// ==/UserScript==

function sleep(ms) {
  return new Promise(resolve => setTimeout(resolve, ms));
}

function hideRejections() {
    sleep("1").then(() => {
        var rows = document.getElementsByClassName("p-x-sm column rejected-column text-xs-right");
        for(var i = 0; i < rows.length; i++) {
            rows[i].style.display = "none";
        }
    });
}

(function() {
    // Rejection count and rejection rate
    document.querySelector("#dashboard-hits-overview > div > div > div:nth-child(6) > div.col-xs-7 > strong").style.display =
    document.querySelector("#dashboard-hits-overview > div > div > div:nth-child(6) > div.col-xs-5.text-xs-right").style.display =
    document.querySelector("#dashboard-hits-overview > div > div > div:nth-child(7) > div.col-xs-8 > strong").style.display =
    document.querySelector("#dashboard-hits-overview > div > div > div:nth-child(7) > div.col-xs-4.text-xs-right").style.display = "none";

    // Rejection columns
    document.querySelector("#MainContent > div:nth-child(4) > div.col-xs-12.col-md-8.col-md-pull-4 > div:nth-child(2) > div > div > ol > li.hidden-sm-down > span.column-header.p-x-sm.rejected-column.text-xs-right").style.display = "none";
    hideRejections();

    var hiddenRows = document.getElementsByClassName("desktop-row hidden-sm-down");
    for(var i = 0; i < hiddenRows.length; i++) {
        hiddenRows[i].addEventListener("click", hideRejections);
    }
})();