Torn Crimes Hide Stories

Hides torn's crime stories but keeps outcome (success/fail) info. Thanks to https://greasyfork.org/scripts/477977

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Torn Crimes Hide Stories
// @namespace    https://github.com/1208nn
// @version      0.4.2
// @description  Hides torn's crime stories but keeps outcome (success/fail) info. Thanks to https://greasyfork.org/scripts/477977
// @author       1208nn
// @match        https://www.torn.com/loader.php?sid=crimes*
// @icon         https://www.torn.com/favicon.ico
// @grant        none
// ==/UserScript==

(async function () {
    'use strict';
    const styles = 'p.story___GmRvQ { display: none; } div.divider___RUQMk { display: none; }';
    let style = document.createElement("style");
    style.type = "text/css";
    style.innerHTML = styles;
    while (document.head == null) {
        await sleep(50);
    }
    document.head.appendChild(style);

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