您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
ibmnb.com (green style)
当前为
// ==UserScript== // @name 51nb-style // @namespace http://tampermonkey.net/ // @version 2024-02-29 // @description ibmnb.com (green style) // @author Envy Chen // @match https://*.ibmnb.com/* // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant none // @run-at document-body // ==/UserScript== (function() { 'use strict'; //document.body.style.display = 'none'; const styleCss = ` /* mobile */ .cr_sub, .tl .cr_c { background: #314734 !important; color: #ddd !important; } .tl .cr_author, .tl .cr_author a { color: #ddd !important; } .tl .cr_date, .tl .cr_views, .tl .cr_reply { color: #999 !important; } .cr180_nv, .forumorderby_title, .bm_title { background: #134e1f; box-shadow: rgba(0, 0, 0, 0.35) 0px -50px 36px -28px inset !important; } .cr180_forum_counts .z { color: #eee !important; } .cr180_message { background: #314734 !important; color: #ddd !important; } .arrow_box { background: #314734 !important; } .cr180_threadtitle { background: #314734 !important; } .cr_sub, .cr_sub a { border-left: 0 !important; border-right: 0 !important; } div#thread_list { background: #0e3115; box-shadow: rgba(0, 0, 0, 0.35) 0px -50px 36px -28px inset !important; } .cr180_modmanage .cr_comment_s, .cr180_modmanage .cr_mods, .cr180_modmanage .cr_editp { color: #ddd !important; } .footer { background-color: transparent !important; } /* desktop */ body { background: #000 !important; color: #ddd !important; font-family: "Microsoft Yahei UI"; } .ftid a { color: #ddd !important; } table td { /* background: #576459;*/ color: #ddd; } tr { background: #314734 !important; } .tns th { color: #ddd !important; /* background: #576459;*/ border: none; } .tl .bm_c tr td, .tl .bm_c tr th { background: #314734 !important; } .tl .bm_c { border: 0; } .tl td em, .tl td em a { color: #ddd !important; } div#second1 { background: #314734; border: 0 !important; } .fl_tb td, .tl .bm_c tr td, .tl .bm_c tr th { border: 1px solid #0c3c0c; } .tl .th { background: #314734 !important; } a { color: #a5c8c6 !important; } a:visited { color: #bdb070 !important; } .authi span { color: #ddd !important; } .tl th em, .tl th em a { color: #ddd !important; } .authi a { /* color: #ddd !important;*/ } span.ppm2 a { color: #afcd09 !important; } a.xi2 { color: #98bab8 !important; } .xg1, .xg1 a { color: #ccc !important; } input#scbar_txt { color: #000 !important; } i.pstatus { color: #ccc !important; } .msgborder { background: #3a6357; color: #ddd !important; } .t_f a font { /* color: #ccc; */ } .tl #forumnewshow a { color: #cc0 !important; border: 0 !important; } .tl #forumnewshow a:hover { background: #425b42; } div#second1 li a:hover { background: none; border: 0 !important; font-weight: 600; } .chart { color: #ddd !important; } p.xg2 font { color: #19a0e4; } .fl .bm_c p, .fl .bm_c dd { color: #ddd !important; } .xi2, .xi2 a, .xi3 a { color: #ddd !important; font-weight: 600; } .bm .bm_h h1, .bm .bm_h h1 a, .bm .bm_h h2, .bm .bm_h h2 a, .bm .bm_h h3, .bm .bm_h h3 a { color: #fefc4f !important; } div#toptb { background: #314734; } .chart em { color: #bbb !important; } .jg12 td { background: #314734; } p.xg2 { color: #ddd !important; } #eis_nv { background: #134e1f; box-shadow: rgba(0, 0, 0, 0.35) 0px -50px 36px -28px inset !important; } .bm .bm_h { background: #134e1f; box-shadow: rgba(0, 0, 0, 0.35) 0px -50px 36px -28px inset !important; } .msgheader { background: #3a6357; box-shadow: rgba(0, 0, 0, 0.35) 0px -50px 36px -28px inset !important; color: #ddd !important; } #ft { color: #bbb !important; } .pi { border: 1px solid #106410; } div#um p a { color: #6cf !important; } .hdc.cl h2 a img { filter: brightness(0.8); } .bbs1, .bbs2 { border: 1px solid #000 !important; } td.pls { border-right: #000 1px solid !important; } .pbn { padding-bottom: 0 !important; margin-bottom: 5px !important; } /* custom reply text */ font[color^="#"] { background: #F7F7F7; } em.xg2 { color: #ddd; } .pf_l em { color: #ddd; } #uhd { background: transparent; } img.user_avatar[src*="noavatar.svg"] { stroke-opacity: revert; border-radius: 50%; zoom: 120%; } a.bm_h { background: transparent !important; } a.bm_h:hover { background: #5e8363 !important; } .pg a, .pg strong, .pgb a, .pg label { background: transparent; border: 0; color: #ddd; } .pg a.prev { background: none; } .pg a.nxt { background: none; } .pg a.prev:after { content: '<'; color: #ddd; } .hdc.cl h2 a:after { content: "51NB"; color: #ddd; font-size: 40px; font-family: "Microsoft Yahei UI"; line-height: 66px; vertical-align: bottom; background: -webkit-linear-gradient(rgb(238 239 238), rgb(57 56 56)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } .hdc.cl h2 a img, div.logo img { display: none !important; } #eis_nv li a:hover { background: transparent !important; font-weight: 600; } #eis_nv li { background: none !important; } .pinf, .pinf strong { color: #ddd !important; } img[src*="smiley"] { filter: drop-shadow(2px 4px 6px black); } .p_pop, .p_pof, .sllt { background: #333; } .jg12 td { background: #134e1f !important; border-bottom: 1px solid #000 !important; } td.t_f[id^="postmessage"] font[style*="color"], div[id^="postmessage"] font[style*="color"] { background: #ccc !important; display:inline-block; }dl[id^="pmlist"] { background: transparent !important; } dl[id^="pmlist"] { background: transparent !important; } li#secondcurrent { color: #ccc; } .alt, .alt th, .alt td { background: transparent !important; } .tfx th, .tfx td { background: transparent !important; } .tdats .h th { color: #ddd !important; } font[color="red"] { color: #e95959; } .nfl .f_c { background: transparent !important; } .rfm table tr { background: transparent !important; } .avt img, img.user_avatar { background: none !important; border: 0 !important; } .sttl { background: transparent !important; } /* badges */ img[id^="md_"] { filter: drop-shadow(1px 2px 3px #fff); } tr.fl_row a img { filter: drop-shadow(2px 2px 4px #eee); } `; const style = document.body.appendChild(document.createElement('style')); style.type = 'text/css'; style.innerHTML = styleCss; const style2 = document.body.appendChild(document.createElement('style')); style2.type = 'text/css'; style2.innerHTML = ` .bbs_theme { position: absolute; top: 2px; left: 150px; } @media screen and (max-width:480px) { .bbs_theme { left:5px; } } select#sel_theme { background: #000; color: #fff; } .slidecontainer { width: 100px; display: inline-block; position: absolute; top: 5px; } /* The slider itself */ .slider { -webkit-appearance: none; width: 100%; height: 10px; border-radius: 5px; background: #d3d3d3; outline: none; opacity: 0.9; -webkit-transition: .2s; transition: opacity .2s; } .slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAYCAIAAACeHvEiAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAq5JREFUeNpi/P//PwMa+Pfr86cP7149vXf12o2Hj199/MEtJKOgqaevKisqJMjHy8HEgAH+o4C/n59f3Te/0ddQlAEL4DH0LZ2/7/zzT79Rdf1HMuXPlxt7pifZSjEQAAK28Z27r7z9jcWUv1/OLSk2lkCo5ZPVdPKLTEyKddOV58AwScQgcvbRp79QTfl1f3OrOcwRrGK6AZlVc7YceQlWdbA+XASrk3RDlpx7+w9uyuf7mxK1BCByguo+zctOf0I49uXqIj9BHH5T9O669PYX2JSfbzdXGLCARdnlHFu2PEYNuFdrcJvCwCCVuuzKj3//GT7eXOfFDxbhVIhsPfIJLfQJmMLA5dRz7cNvpkfHFu36COLLmrvGZlrxMpAGvh1auO/2B6Zbp/b+AXHF9XXdbQUZGUgFf64cvPiI6e7xXyAOr7iQug4PAxng/4mHL5je3YAELBs7PycDWeDVnz9MDKxgJiMQMJFnCiPDfyYxfTDzw5fvt16SZ4qGID+Tuq00iPn7yePbJ5//I8MQNidleSY9uwhw7vl85vKudZe+kWwIr7uFjgiThFlwqjEou325sm/hpPl3STOHUSUh1l6eG5iPvl9ZnAjNzOxyQTWrHv5CTrsv8aVdcde5519Dc+PvD1cnh2hCsz+7lGdO584r72Cm/NhSGSyE3QxR7/Zd738hlS/f7m0vtpOHSbPKm/vnVTZNXrj55Lkjs5Jc+LEYIWSaOPPKh1/oZd37Gzur/bSRCyR2QVkdfV1NCQEWNBOYpD2LlkDKBIwSExhCLy6v78m2EGbBV14aB7SvOfbsyz8c5S4E/P787Ob5nfM7M1y1RdiQUoWoskta3Zz1h248evsLXc9/Riw1Cagy+f31y6ev375/+/H927f/XFycHFycnNw8PNwczNgcCBBgAALk80Jz0kwqAAAAAElFTkSuQmCC"); } .slider::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAYCAIAAACeHvEiAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAq5JREFUeNpi/P//PwMa+Pfr86cP7149vXf12o2Hj199/MEtJKOgqaevKisqJMjHy8HEgAH+o4C/n59f3Te/0ddQlAEL4DH0LZ2/7/zzT79Rdf1HMuXPlxt7pifZSjEQAAK28Z27r7z9jcWUv1/OLSk2lkCo5ZPVdPKLTEyKddOV58AwScQgcvbRp79QTfl1f3OrOcwRrGK6AZlVc7YceQlWdbA+XASrk3RDlpx7+w9uyuf7mxK1BCByguo+zctOf0I49uXqIj9BHH5T9O669PYX2JSfbzdXGLCARdnlHFu2PEYNuFdrcJvCwCCVuuzKj3//GT7eXOfFDxbhVIhsPfIJLfQJmMLA5dRz7cNvpkfHFu36COLLmrvGZlrxMpAGvh1auO/2B6Zbp/b+AXHF9XXdbQUZGUgFf64cvPiI6e7xXyAOr7iQug4PAxng/4mHL5je3YAELBs7PycDWeDVnz9MDKxgJiMQMJFnCiPDfyYxfTDzw5fvt16SZ4qGID+Tuq00iPn7yePbJ5//I8MQNidleSY9uwhw7vl85vKudZe+kWwIr7uFjgiThFlwqjEou325sm/hpPl3STOHUSUh1l6eG5iPvl9ZnAjNzOxyQTWrHv5CTrsv8aVdcde5519Dc+PvD1cnh2hCsz+7lGdO584r72Cm/NhSGSyE3QxR7/Zd738hlS/f7m0vtpOHSbPKm/vnVTZNXrj55Lkjs5Jc+LEYIWSaOPPKh1/oZd37Gzur/bSRCyR2QVkdfV1NCQEWNBOYpD2LlkDKBIwSExhCLy6v78m2EGbBV14aB7SvOfbsyz8c5S4E/P787Ob5nfM7M1y1RdiQUoWoskta3Zz1h248evsLXc9/Riw1Cagy+f31y6ev375/+/H927f/XFycHFycnNw8PNwczNgcCBBgAALk80Jz0kwqAAAAAElFTkSuQmCC"); cursor: pointer; } `; //window.setTimeout(function(){ // document.body.style.display = ''; //}, 500); //https://stackoverflow.com/questions/14196671/session-only-cookies-with-javascript function setCookie(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); var expires = "expires="+ d.toUTCString(); document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; } function getCookie(cname) { var name = cname + "="; var decodedCookie = decodeURIComponent(document.cookie); var ca = decodedCookie.split(';'); for(var i = 0; i <ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1); } if (c.indexOf(name) == 0) { return c.substring(name.length, c.length); } } return null; } var theme = getCookie('sel_theme'); if (theme == null) theme = 1; var t = document.createElement('div'); t.className = 'bbs_theme'; t.innerHTML = `<select id="sel_theme" onchange="onSelTheme()"><option value="0">默认主题</option><option value="1">绿色护眼</option></select><div class="slidecontainer"> <input type="range" min="1" max="100" value="50" class="slider" id="myRange"> </div>`; document.body.appendChild(t); window.onSelTheme = function(){ var val = document.getElementById('sel_theme').value; if (val == 0){ style.innerHTML = ""; setCookie('sel_theme', 0); }else if (val == 1){ style.innerHTML = styleCss; setCookie('sel_theme', 1); } } //alert(theme); document.getElementById('sel_theme').value = theme; window.onSelTheme(); // brightness setting var brg = getCookie('cur_brg'); if (brg == null) brg = 50; var slider = document.getElementById("myRange"); slider.value = brg; // Update the current slider value (each time you drag the slider handle) slider.oninput = function() { document.body.style.filter = "brightness("+(parseInt(this.value,10)/100 + 0.5)+")"; setCookie('cur_brg', this.value); } slider.oninput(); })();