Mcbbs-Light

the new

  1. // ==UserScript==
  2. // @name Mcbbs-Light
  3. // @namespace undefined
  4. // @version 0.6
  5. // @description the new
  6. // @author Snownee
  7. // @include *mcbbs.net/*
  8. // ==/UserScript==
  9.  
  10. jQuery(document).ready(function($) {
  11. console.log('欢迎使用 MCBBS Light! =w=');
  12. // 修改标题
  13. // document.title = " Minecraft(我的世界)中文论坛 - Mcbbs";
  14. // $("[src='template/mcbbs/image/logo_sc.png']").attr("src ", "http://i.imgur.com/8WUBLPS.png");
  15. // 主体背景颜色
  16. var css = `
  17. #scrolltop {
  18. bottom: 40px !important;
  19. transform: translateX(50px);
  20. }
  21. #scrolltop .scrolltopa {
  22. background-color: #7E57C2 !important;
  23. background-image: none !important;
  24. border-radius: 50%;
  25. width: 54px !important;
  26. padding: 0;
  27. box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 3px 5px -1px rgba(0, 0, 0, 0.2);
  28. color: #fff;
  29. line-height: 54px;
  30. font-size: x-large;
  31. font-family: cursive;
  32. font-weight: bolder;
  33. transform: rotate(-89deg);
  34. }
  35. #body_fixed_bg {
  36. background-size: cover !important
  37. }
  38. .ad {
  39. display: none
  40. }
  41. #wp .wp, #hd .wp,
  42. .pm .flb {
  43. background: none !important;
  44. }
  45. .kk_xshow .kkinnerpad,
  46. .kk_xshow .tab,
  47. .plugin .bm_h,
  48. .portal_left_dev,
  49. .m_c,
  50. #ct.wp.ct1,
  51. .move-span,
  52. .appl,
  53. #threadlist,
  54. .pm_tac, .c,
  55. .special_user_login,
  56. #group_f_mn .xld.xlda,
  57. #group_f_mn .tbmu {
  58. background: #FDFDFD !important
  59. }
  60. .portal_left_content,
  61. .portal_left_content,
  62. #portal_index_right .portal_note,
  63. #portal_index_right .portal_news,
  64. #portal_index_right .portal_game,
  65. #portal_index_right .portal_zb,
  66. .portal_wrapper4_dev,
  67. .portal_left_dev,
  68. #autopbn,
  69. .bm_h,
  70. .tbn ul,
  71. #diy5,
  72. #deletepmform,
  73. .ct1, #uhd,
  74. .sttl.mbn {
  75. border: none !important
  76. }
  77. .kk_xshow .tab, .kk_xshow .tab_cur {
  78. color: #444
  79. }
  80. .kk_xshow li,
  81. .pg_index .mn>.fl.bm,
  82. .pg_guide .mn {
  83. background: none !important
  84. }
  85. .bm {
  86. border: none;
  87. background: #FDFDFD !important;
  88. }
  89. #threadlist>.bm_c,
  90. .bm_c[id|=recommendgroups_],
  91. .pg_index .bm_c {
  92. padding: 0 !important
  93. }
  94. #ip_notice,
  95. .special_user_info {
  96. display: none;
  97. }
  98. .bmw,
  99. .move-span,
  100. .special_user_info,
  101. embed,
  102. .kk_xshow .kkinnerpad,
  103. #postlist,
  104. #f_pst,
  105. .portal_left_dev,
  106. #threadlist,
  107. .bml.pbn,
  108. #thread_types,
  109. #autopbn,
  110. #pt,
  111. .pgbtn,
  112. #threadindex>.tindex,
  113. .pg_space .bm,
  114. .appl,
  115. #nv_group .mn>.bm,
  116. #nv_group .sd>.bm,
  117. .pg_spacecp .bm,
  118. #editorbox,
  119. #uhd,
  120. #nv_portal .bm,
  121. #nv_group .tb.cl,
  122. #darkroomtable,
  123. .sttl.mbn,
  124. #postform .bm.cl,
  125. .special_user_login,
  126. #group_f_mn .xld.xlda,
  127. #group_f_mn .tbmu,
  128. .ttp.cl {
  129. box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.14), 0 3px 3px -2px rgba(0, 0, 0, 0.2), 0 1px 8px 0 rgba(0, 0, 0, 0.12) !important;
  130. }
  131. #framea7S7Jl, #portal_block_711 {
  132. box-shadow: none !important
  133. }
  134. #visitedforumstmp {
  135. margin-left: 0
  136. }
  137. #faq_right {
  138. margin-left: 0;
  139. background: none;
  140. }
  141. #faq_right .faq_right_inp {
  142. background: none;
  143. border-bottom: 2px solid #C2D5E3;
  144. font-size: 16px;
  145. }
  146. .pg_index .mn {
  147. width: 662px !important;
  148. }
  149. .mn {
  150. padding: 4px !important;
  151. transform: translate(-4px, -4px);
  152. }
  153. table.fl_tb tr,
  154. .tl tr th, .tl tr td,
  155. #hd .p_pop a {
  156. transition: background .2s;
  157. }
  158. table.fl_tb tr:hover,
  159. .tl tr:hover th, .tl tr:hover td,
  160. .kk_xshow .tab_cur,
  161. #hd .p_pop a:hover {
  162. background-color: #EFF6F8 !important
  163. }
  164. .fl_icn, .fl_g, #postbox, #threadlist {
  165. padding: 10px !important;
  166. }
  167. #portal_block_741 iframe, #portal_block_713_content iframe {
  168. height: 416px;
  169. width: 100% !important
  170. }
  171. #portal_block_713 {
  172. height: 450px;
  173. }
  174. .kkinnerpad div img {
  175. visibility: hidden;
  176. }
  177. .bm_h,
  178. .blocktitle.title,
  179. .portal_left_title,
  180. .tbn .mt.bbda,
  181. .mn .tb {
  182. background-color: #1976D2 !important;
  183. background-image: none !important;
  184. padding: 0 10px !important;
  185. }
  186. #nv {
  187. height: 38px !important;
  188. transform: translateY(-5px);
  189. }
  190. .block>.title,
  191. .tbn .mt.bbda,
  192. #threadlist {
  193. width: auto !important
  194. }
  195. #portal_index_right .block .dxb_bc {
  196. margin: 0 4px !important;
  197. }
  198. #autopbn,
  199. .pgbtn a {
  200. color: #fff !important
  201. }
  202. .pgs {
  203. background: none !important
  204. }
  205. #pt .z {
  206. margin-left: 10px
  207. }
  208. #thread_types {
  209. padding: 10px 10px 5px 10px;
  210. }
  211. .pls {
  212. background: #e1f5fe !important;
  213. border-right: 1px solid #C2D5E3 !important;
  214. }
  215. .pi {
  216. border-color: #C2D5E3 !important
  217. }
  218. .tbn li {
  219. border-bottom-style: solid;
  220. margin: 0 !important;
  221. padding: 0 10px !important;
  222. }
  223. .tbn li.a {
  224. border-top: none;
  225. }
  226. .pg_space .pgs {
  227. padding-bottom: 10px;
  228. }
  229. .pg_guide .pbn {
  230. padding-bottom: 0 !important
  231. }
  232. .pg_guide .bm_c.cl.pbn {
  233. display: none
  234. }
  235. .mn .tb li a {
  236. color: #FDFDFD
  237. }
  238. .ct2_a .mn {
  239. transform: translate(4px,-4px);
  240. }
  241. .appl {
  242. width: auto;
  243. margin: 0;
  244. float: none;
  245. }
  246. #nv_group .bm {
  247. margin: 3px;
  248. }
  249. #nv_group .bm_c {
  250. padding: 8px !important;
  251. }
  252. #group_mn {
  253. width: 682px !important
  254. }
  255. .frame-1-1-l, .frame-1-1-r {
  256. width: 48.9% !important
  257. }
  258. #nv_home #ct {
  259. background: none !important
  260. }
  261. #nv_group .tb.cl,
  262. #nv_group .ttp.cl,
  263. #group_f_mn>* {
  264. margin: 0 3px !important
  265. }
  266. #wp #portal_block_741_content {
  267. margin: 0 !important;
  268. }
  269. #nv_search .pgs {
  270. margin-top: 10px;
  271. float: right
  272. }
  273. .showhide, .ignore_notice {
  274. height: 11px !important;
  275. }
  276. #my16modannouncement, #mymodannouncement {
  277. background: #e1f5fe !important;
  278. border-color: #ddd !important;
  279. }
  280. .bbda, .tbmu, .bm_c tr td, .bm_c tr th {
  281. border-bottom: 1px solid #C2D5E3 !important;
  282. }
  283. .fl_row td, #nv_group .bm_c tr:first-child td, #nv_group .bm_c tr:first-child th {
  284. border-top: 1px solid #C2D5E3 !important;
  285. }
  286. .xlda .m {
  287. margin: 8px 0 8px -60px;
  288. }
  289. #group_f_mn .tbmu {
  290. padding: 8px 10px 8px 0;
  291. }
  292. `;
  293.  
  294. $('.bm.bmw.cl, #tabVpFJkk_content').css('background', '#FDFDFD');
  295. $('.bm_c, .move-span').css("cssText", "border:none !important;");
  296. $('.weiboShow .weiboShow_wrap').css("cssText", "background:#FDFDFD !important;");
  297. $('#frameEUfgzT, #frameVrMSR7').removeClass('move-span');
  298. $('.hdc h2 a').attr('href', 'http://www.mcbbs.net/forum.php');
  299. $('#ft').parent().css({'min-width': '1130px', 'background': 'rgba(0, 0, 0, 0.4) none repeat scroll 0 0', 'margin-top': '-40px', 'padding-top': '50px'});
  300. $('.pg_group #pgt').parent().css({'background': '#FDFDFD', 'box-shadow': '0 3px 4px 0 rgba(0, 0, 0, 0.14), 0 3px 3px -2px rgba(0, 0, 0, 0.2), 0 1px 8px 0 rgba(0, 0, 0, 0.12)', 'margin': '0 3px', 'border': 'none'});
  301. $('#scrolltop .scrolltopa').text('>');
  302. $('#group_f_mn .tbmu:not(.cl)').css('padding', '0 20px 5px');
  303. $('#ft').parent().css('background', 'none');
  304. $('#tabVpFJkk_title').css('background-color', '#DDD');
  305. $('#toptb').append(`
  306. <a href="javascript:;" id="qmenu" onmouseover="delayShow(this, function () {showMenu({'ctrlid':'qmenu','ctrlclass':'a','duration':1});showForummenu();})" initialized="true" class="a">♥</a>
  307. `);
  308. $('#qmenu').click(function(e) {$(e).hide();});
  309.  
  310. //修改顶部
  311. css += `
  312. #qmenu.a {
  313. position: absolute;
  314. right: 0;
  315. background: none;
  316. width: auto;
  317. height: 35px;
  318. color: #F44336;
  319. font-size: 24px;
  320. margin: 7px;
  321. }
  322. #toptb {
  323. background: none 0px 0px repeat scroll rgba(0, 0, 0, 0.4);
  324. line-height: 39px;
  325. height: auto;
  326. box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 3px 5px -1px rgba(0, 0, 0, 0.2);
  327. }
  328. #toptb .z a {
  329. height: 39px;
  330. }
  331. #toptb .z a:hover {
  332. background: rgba(255, 255, 255, 0.2) none repeat scroll 0 0;
  333. background-size: 100% 37px;
  334. color: #fff;
  335. text-decoration: none;
  336. }
  337. #um {
  338. margin-right: 82px;
  339. }
  340. .mc_map_wp {
  341. margin-top: -26px;
  342. }
  343. `;
  344. $(".hdc.cl > h2").css("margin-top", "-18px").css("margin-left", "130px");
  345.  
  346. //边框修改
  347. css += `
  348. .mc_map_border_top {
  349. background: none;
  350. height: 0;
  351. }
  352. .mc_map_border_right {
  353. background: none
  354. }
  355. .mc_map_border_foot {
  356. height: 0;
  357. background: none
  358. }
  359. .mc_map_border_left {
  360. background: none
  361. }
  362. `;
  363.  
  364. //导航栏修改
  365. css += `
  366. #nv .nv_ul {
  367. background: none
  368. }
  369.  
  370. #nv .nv_ul li a {
  371. width: 80px;
  372. height: 57px;
  373. padding: 0;
  374. text-align: center;
  375. font-size: 14px;
  376. background: none !important;
  377. border: none
  378. }
  379. #nv .nv_ul li a:hover {
  380. background: none !important;
  381. color: #ffff58;
  382. text-decoration: underline;
  383. }
  384. #nv .nv_ul li {
  385. width: 60px;
  386. padding: 0;
  387. height: 57px;
  388. line-height: 56px;
  389. background: none !important;
  390. }
  391. #nv .nv_ul li:last-child a {
  392. border: none;
  393. }
  394. #nv .nv_ul li:first-child a:hover{
  395. border: none;
  396. }
  397. #nv li#mn_N7844.hover a {
  398. background: none !important;
  399. color: #ffff58 !important;
  400. }
  401. #hd .h_pop {
  402. border: none !important;
  403. background: #FDFDFD !important;
  404. box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 3px 5px -1px rgba(0, 0, 0, 0.2);
  405. }
  406. #hd .p_pop a {
  407. background: none;
  408. }
  409. `;
  410. $("#nv_right").remove();
  411.  
  412. //修改搜索
  413. css += `
  414. .y_search {
  415. width: auto;
  416. margin-top:4px;
  417. }
  418. .y_search_inp {
  419. background: none;
  420. }
  421. `;
  422. $(".y_search_btn").remove();
  423.  
  424. //分情况处理
  425. var url = document.URL;
  426. if (url.includes("/forum.php") || url.includes("/portal.php")) {
  427.  
  428. //修改个人资料部分
  429. css += `
  430. .special_info_t {
  431. background: none !important
  432. }
  433. .special_info_i {
  434. background: none !important
  435. }
  436. .special_user_info {
  437. background: #FDFDFD !important;
  438. height: 113px !important
  439. }
  440. .special_user_info1, .special_user_info3 {
  441. display: none !important
  442. }
  443. `;
  444.  
  445. //背景修改
  446. css += `
  447. #nv_forum #ct {
  448. background: none;
  449. }
  450. `;
  451.  
  452. if (url.includes("/portal.php")) {
  453. //修改侧边栏
  454. css += `
  455. #portal_index_right .block {
  456. background: #FDFDFD
  457. }
  458. #portal_index_right .frame {
  459. background: none
  460. }
  461. #portal_index_right .portal_game {
  462. width: auto;
  463. }
  464. #portal_index_right .portal_game {
  465. padding: 0px 1px
  466. }
  467. `;
  468.  
  469. $('#portal_block_741_content iframe').css('border', 'none');
  470.  
  471. //修改轮播
  472. css += `
  473. .ss3_wrapper .slideshow_paging li {
  474. background: none;
  475. }
  476. .ss3_wrapper .slideshow_paging a {
  477. width: 90px;
  478. height: 43px;
  479. overflow: hidden;
  480. }
  481. .ss3_wrapper .slideshow_paging .activeSlide {
  482. background-color: rgba(255,255,255,0.4);
  483. }
  484. .portal_wrapper4 .slideshow_paging li {
  485. height: auto;
  486. }
  487. #portal_left .portal_txt table {
  488. margin: auto 8px;
  489. }
  490. .portal_wrapper .slideshow_paging a {
  491. width: 73px;
  492. height: 39px
  493. }
  494. .portal_wrapper .slideshow_paging li {
  495. background: none;
  496. }
  497. .portal_wrapper .slideshow_paging .activeSlide {
  498. background-color: rgba(255,255,255,0.6);
  499. }
  500. #slideshow_3 .slideshow_item .image a {
  501. height: 320px;
  502. width: 670px;
  503. overflow: hidden;
  504. }
  505.  
  506. `;
  507. }
  508. if (url === "http://www.mcbbs.net/forum.php") {
  509. //修改侧边栏
  510. css += `
  511. #forum_index_right .frame {
  512. background: none;
  513. }
  514. #forum_index_right .block {
  515. background-color: #FDFDFD !important;
  516. }
  517. .tb a {
  518. border: none;
  519. }
  520. `;
  521. $('#category_1 td').attr('width', '49.9%');
  522. }
  523. } else if (url.includes("http://www.mcbbs.net/misc.php?mod=faq")) {
  524. //修改背景
  525. css += `
  526. .tbn {
  527. background: #FDFDFD
  528. }
  529. .lum ul {
  530. background: #FDFDFD !important
  531. }
  532. `;
  533. if (url === "http://www.mcbbs.net/misc.php?mod=faq") {
  534. css += `
  535. .bm {
  536. background: none;
  537. }
  538. `;
  539. }
  540. if (new RegExp("mod=faq&action=faq&id=\d*").test(url)) {
  541. css += `
  542. .bm {
  543. background: #FDFDFD
  544. }"
  545. `;
  546. }
  547. }
  548. $("<style></style>").text(css).appendTo($("head"));
  549. });