@run-at
https://www.tampermonkey.net/documentation.php#_run_at
document-start
document-body
document-end
document-idle
context-menu
https://wiki.greasespot.net/Metadata_Block#.40run-at
document-end
document-start
document-idle
不废话直接上代码
// ==UserScript==
// @name delphibox-2ccc
// @namespace http://userstyles.org
// @description delphibox bbs.2ccc.com beautify prettify high-dpi
// @author HUIANG
// @homepage https://userstyles.org/styles/204336
// @include http://bbs.2ccc.com/*
// @include https://bbs.2ccc.com/*
// @include http://*.bbs.2ccc.com/*
// @include https://*.bbs.2ccc.com/*
// @run-at document-start
// @version 0.20210526074900
// ==/UserScript==
(function() {var css = [
"body {",
" font-family: source-han-serif-tc, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen, Ubuntu, Cantarell, \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif!important;",
" min-width: unset;",
" background: none!important;",
" background-color: rgba(119, 136, 153, .8)!important;",
" FONT-SIZE: 11pt; ",
"}",
"",
"table[width=\"770\"] {",
" border-radius: 5px!important;",
" min-width:770px;",
" width: 100%;",
"}",
"",
"td {",
" FONT-SIZE: 11pt; ",
"}",
"td[width=\"3\"] {",
" min-width:3px;",
" width:3px;",
"}",
"td[width=\"151\"] {",
" min-width:151px;",
" width:15%;",
"}",
"table[width=\"151\"] {",
" min-width:151px;",
" width:100%;",
"}",
"",
"td[colspan=\"2\"] {",
" line-height: 26px;",
"}",
"",
"tr[bgcolor] > td[align=\"right\"] {",
" min-width: 45px;",
" width: 6%;",
"}",
"",
"div[class=\"parent\"] {",
" border-radius: 8px;",
" padding-top: 10px;",
" text-shadow: rgba(0,0,0,0.296875) 0 2px 3px",
"}",
"",
"div[class=\"child\"] {",
" position: relative;",
" top: -10px; ",
"}",
"",
".parent tr {",
" background-color: rgb(196, 223, 250)!important; ",
"}",
"",
".parent > table {",
" background-color: rgb(247, 247, 247)!important; ",
" padding-bottom: 10px;",
" border-radius: 8px 8px 8px 8px!important; ",
"}",
"",
".parent + .parent tr {",
" background-color: rgb(196, 223, 250)!important;",
"}",
"",
".parent tr:first-child td:first-child {",
" border-top-left-radius: 8px;",
"}",
".parent tr:first-child td:last-child {",
" border-top-right-radius: 8px;",
"}",
".parent tr:first-child td:nth-child(2) {",
" font-size: 12pt;",
"}",
"",
".child > table {",
" border-radius: 0px 0px 8px 8px!important; ",
"}",
"",
".child tr:last-child td:first-child {",
" border-bottom-left-radius: 8px;",
"}",
".child tr:last-child td:last-child {",
" border-bottom-right-radius: 8px;",
"}",
"",
"table[bgcolor=\"#666666\"] a {",
" display: inline-block;",
" padding: 3px 12px;",
" background: #ecedee;",
" border-radius: 12px;",
" color: #888;",
" font-size: 13px;",
" line-height: 18px;",
"}",
"table[background=\"images/bg_blue.jpg\"] {",
" background: none;",
"}",
"img[src=\"http://icon.cnzz.com/img/pic.gif\"] {",
" display: none;",
"}",
"",
".line ,.text{",
" box-sizing: border-box;",
" padding: 3px 16px;",
" outline: none;",
" font-size: 12px;",
" color: #C4C9D2;",
" letter-spacing: 0;",
" line-height: 20px;",
" background-color: #FFFFFF!important;",
" border: 1px solid #E1E4E8!important;",
" border-radius: 2px; ",
"}",
".line:hover, .text:hover {",
" color: #252a32;",
" border-color:#2196F3!important;",
"}",
".line:focus, .text:focus {",
" color: #252a32;",
" border-color:#2196F3!important;",
" box-shadow:0 0 0 2px rgba(24,144,255,.2); ",
"}",
".button, .button2 {",
" display: inline-block;",
" margin-top: 2px;",
" margin-bottom: 2px;",
" margin-right: 2px;",
" text-align: center;",
" text-transform: uppercase;",
" vertical-align: middle;",
" cursor: pointer;",
" background-image: none;",
" padding: 2px 10px;",
" font-size: 1rem;",
" border-radius: 3px;",
" border: 1px solid #2196f3;",
" text-decoration: none;",
" user-select: none;",
" color: #888;",
" background: rgb(247, 247, 247);",
" box-shadow: none;",
"}",
".button:hover, .button2:hover {",
" border-color: transparent;",
" color: #fff;",
" background: #90a4ae;",
" box-shadow: none;",
" text-decoration: none;",
"}",
".button:active, .button2:active {",
" border-color: #546e7a;",
" color: #cfd8dc;",
" background: #546e7a;",
" box-shadow: none;",
"}",
"",
"table[width=\"100%\"] > a[href=\"javascript:OpenInfoWin(\'http://www.2ccc.com/member.asp?membername=patebeng1\"] {",
" display: none!important;",
"}",
"",
"/* -------------------- 2ccc bbs.ccs --------------------- */",
"",
"A:link{",
" FONT-SIZE: 12pt;",
"}",
"A:visited {",
" FONT-SIZE: 12pt}",
"A:hover {",
" COLOR: #FF0000; ",
" FONT-SIZE: 12pt}",
".text {",
" FONT-SIZE: 10pt",
"}",
".text2 {",
" FONT-SIZE: 10pt;",
"} ",
".textarea {",
" FONT-SIZE: 10pt",
"}",
".textarea2 {",
" FONT-SIZE: 10pt",
"}",
".button {",
"/* FONT-SIZE: 10pt */",
"}",
".button2 {",
" FONT-SIZE: 10pt",
" }",
".line { ",
"/* border-color: rgba(242, 250, 100, .8)!important; */",
"}",
".select {",
" FONT-SIZE: 10pt",
"}",
".select2 {",
" box-sizing: border-box;",
" padding: 3px 16px;",
" outline: none;",
" font-size: 12px;",
" color: #C4C9D2;",
" letter-spacing: 0;",
" line-height: 20px;",
" background-color: #FFFFFF;",
" border: 1px solid #E1E4E8;",
" border-radius: 2px;",
"}",
".select2:hover {",
" color: #252a32;",
" border-color:#2196F3;",
"}",
".select2::focus {",
" color: #252a32;",
" border-color:#2196F3;",
" box-shadow:0 0 0 2px rgba(24,144,255,.2);",
"}",
".file {",
" height: 30px;",
" width: 40px;",
" font-size: 10pt;",
"}",
".shadow1{",
" FONT-SIZE: 10pt;",
"}",
".shadow2{",
" FONT-SIZE: 10pt;",
"}",
".shadow3{FONT-SIZE: 10pt;",
"}",
".bigfont {",
"/* FONT-SIZE: 12pt; */",
"/* LINE-HEIGHT: 140% */",
"}"
].join("\n");
if (typeof GM_addStyle != "undefined") {
GM_addStyle(css);
} else if (typeof PRO_addStyle != "undefined") {
PRO_addStyle(css);
} else if (typeof addStyle != "undefined") {
addStyle(css);
} else {
var node = document.createElement("style");
node.type = "text/css";
node.appendChild(document.createTextNode(css));
var heads = document.getElementsByTagName("head");
if (heads.length > 0) {
heads[0].appendChild(node);
} else {
// no head yet, stick it whereever
document.documentElement.appendChild(node);
}
}
})();