Dark Wiki

Turn Torn's wiki dark

目前為 2023-12-31 提交的版本,檢視 最新版本

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

You will need to install an extension such as Tampermonkey to install this script.

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Dark Wiki
// @namespace    Dark Wkik
// @version      1.2.3
// @description  Turn Torn's wiki dark
// @author       AfricanChild [3157295] & Phillip_J_Fry [2184575] 
// @icon         https://www.google.com/s2/favicons?sz=64&domain=torn.com
// @match        https://www.wiki.torn.com/wiki/*
// @license      GPL-3
// @downloadURL
// ==/UserScript==

//Body
document.body.style.backgroundColor = "#191919";

//Main content
document.querySelector(".col-12.col-md-8.content-area-wrapper").style.backgroundColor = "#333333";
//Headers
document.querySelectorAll("h1, h2, h3, h4").forEach(el => {el.style.color = "#efb300"; el.style.borderBottom = "1px solid #4d4d4d";});
document.querySelectorAll(".firstHeading").forEach(firstHeading => firstHeading.style.borderBottom = "none");

//Paragraphs
document.querySelectorAll("p").forEach(p => p.style.color = "white");
//List
document.querySelectorAll("li").forEach(li => li.style.color = "#a2a9b1");
//Link colors
document.querySelectorAll("a").forEach(a => a.style.color = "#4cc9ff");
document.querySelectorAll(".toctogglelabel").forEach(a => a.style.color = "#4cc9ff");
document.querySelectorAll(".th").forEach(a => a.style.backgroundColor = "red");

//Button
document.querySelectorAll(".torn-mass-collapse-control a").forEach(a => {a.style.color = "white"; a.style.backgroundColor = "#4d4d4d"; a.style.border = "none";});

//Top navigation
document.querySelector(".card.torn-navigation-header").style.backgroundImage = "none";
document.querySelector(".card.torn-navigation-header").style.backgroundColor = "#333333";
document.querySelector(".torn-back-button").style.color = "white";
//Bottom navigation
document.querySelector(".card.torn-navigation-panel").style.backgroundColor = "#333333";

//Footer
document.querySelector(".list-inline").style.color = "#a2a9b1";
document.querySelector(".catlinks").style.border = "0.5px solid #4d4d4d";

//Misc
document.querySelectorAll("pre").forEach(th => {th.style.backgroundColor = "#292929"; th.style.color = "white"; th.style.border = "none";});
document.querySelectorAll("th").forEach(th => {th.style.backgroundColor = "#292929"; th.style.color = "white";});
document.querySelectorAll(".content-area-wrapper #content").forEach(th => {th.style.color = "#a2a9b1";});

//Table
document.querySelectorAll(".table th").forEach(element => element.style.border = "2px solid #4d4d4d");
document.querySelectorAll(".table td").forEach(element => element.style.border = "1px solid #4d4d4d");

document.querySelectorAll("td").forEach(td => {td.style.backgroundColor = "#292929"; td.style.color = "white";});
document.querySelectorAll(".content-area-wrapper #content table.wikitable.mw-collapsible tr:first-child > th, .content-area-wrapper #content table.wikitable.mw-collapsible tr:first-child > td")
    .forEach(cell => {
        cell.style.setProperty("background-color", "#333333", "important");
        cell.style.setProperty("color", "white");
    });
document.querySelectorAll(".content-area-wrapper #content table.wikitable.mw-collapsible tr:first-child > th, .content-area-wrapper #content table.wikitable.mw-collapsible tr:first-child > td").forEach(cell => cell.style.borderTop = "0.5px solid #737373");