Dark Wiki

Turn Torn's wiki dark

当前为 2023-12-31 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

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

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

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

您需要先安装一款用户脚本管理器扩展,例如 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");