优化本地文档的阅读体验,支持 txt、md、css、log、js、json、等格式。
local file reading modification.
Authorrunningcheese
LicenseMIT
Categoryuserstyles
Created
Updated
Code size1.3 kB
Code checksume6af4943
Learn how we calculate statistics in the FAQ.
Failed to fetch stats.
优化本地文档的阅读体验,支持 txt、md、css、log、js、json、等格式。
local file reading modification.
PS:需要在 Stylus 扩展设置面里,打开“允许访问文件地址”。
/* ==UserStyle==
@name 本地文档阅读优化
@version 1.1
@description 优化本地文档的阅读体验!
@author RunningCheese
@namespace https://userstyles.world/user/runningcheese
@homepageURL https://www.runningcheese.com
@supportURL https://www.runningcheese.com/userstyles
==/UserStyle== */
@-moz-document regexp(".*\.(t|T)(x|X)(t|T)|.*\.(c|C)(s|S)(s|S)|.*\.(i|I)(n|N)(i|I)|.*\.(l|L)(o|O)(g|G)|.*\.(j|J)(s|S)|.*\.(j|J)(s|S)(o|O)(n|N)|.*\.(b|B)(a|A)(t|T)|.*\.(p|P)(y|Y)|.*\.(s|S)(h|H)|.*\.(p|P)(e|E)(m|M)|.*\.(l|L)(r|R)(c|C)|.*\.(m|M)(d|D)|.*\.markdown") {
html > body:not([bgcolor]) {
background-color: #f9f9fa !important;
}
html > body:not([bgcolor]) > pre {
max-width: 960px !important;
margin: 40px auto !important;
padding: 25px !important;
white-space: pre-wrap !important;
font-size: 15px !important;
font-family: Segoe UI, Segoe UI Midlevel, Segoe WP, Arial, sans-serif !important;
color: #000 !important;
line-height: 25px !important;
}
/*黑夜模式*/
@media (prefers-color-scheme: dark) {
html > body:not([bgcolor]) {
background-color: #2B2A32 !important;
}
html > body:not([bgcolor]) > pre {
color: #fff !important;
}
}
}