// ==UserScript== // @name 掘金小册阅读暗黑模式 // @namespace lgldlk // @version 0.1 // @description 掘金小册没有暗黑模式🥀,长时间阅读有点伤眼睛,于是自己做了一个✌️。 // @author lgldlk // @license MIT // @grant GM_addStyle // @run-at document-start // @match *://juejin.cn/book/*/section/* // @downloadURL none // ==/UserScript== (function() { let css = ` .book-content .book-content-inner .book-body { background-color: #4f4f4f; } .logo path { fill: #fff; } .book-content__header { background-color: #2C2D2C; color: #eee; } .book-content .book-content-inner .book-content__header .title a { color: #fff; } .book-summary__header: { background-color: #2C2D2C color: #eee } .book-summary__header .label { color: #fff; background-color: rgb(87, 87, 87, 10%); } .section-page.book-section-view { background-color: #2C2D2C; max-width: 1000px; } .markdown-body { color: #eee; } .book-summary-inner { background-color: #2C2D2C; } .book-summary-inner .title { color: #ccc; } .section.route-active .title { color: #fff; } .route-active .label { color: #fff; background: rgb(92 96 102); } .route-active .left .index { color: #fff; } .book-directory-comp { color: #eee; } .book-summary__footer { display: none; } .step-btn { background: #5e6063; } .route-active:after { background-color: #FFF !important; } `; if (typeof GM_addStyle !== "undefined") { GM_addStyle(css); } else { const styleNode = document.createElement("style"); styleNode.appendChild(document.createTextNode(css)); (document.querySelector("head") || document.documentElement).appendChild(styleNode); } })();