🏠 Home 

Two Column S1

two colomn ui for s1


Install this script?
  1. // ==UserScript==
  2. // @name Two Column S1
  3. // @namespace https://exz.me/
  4. // @version 0.14
  5. // @description two colomn ui for s1
  6. // @author Epix
  7. // @match https://bbs.saraba1st.com/2b/*
  8. // @grant GM_addStyle
  9. // ==/UserScript==
  10. var width = 47;
  11. var list_on_left = true;
  12. if (self === top && location.href.startsWith('https://bbs.saraba1st.com/2b/forum-') || (new RegExp("mod=forumdisplay")).test(location.href)) {
  13. $('nv_forum').style['width'] = width + '%';
  14. GM_addStyle('.wp,#toptb{min-width:0 !important');
  15. var f = document.createElement("iframe");
  16. f.id = 'frame';
  17. f.name = 'frame';
  18. f.style.width = (100 - width) + '%';
  19. f.style.height = '95%';
  20. f.style.position = 'fixed';
  21. f.style.right = '0';
  22. f.style.bottom = '0';
  23. document.body.appendChild(f);
  24. document.onclick = function (event) {
  25. var target = event.target;
  26. //console.log(target.nodeName,target.href);
  27. //return;
  28. var url = null;
  29. if (target.nodeName === "TH" && target.parentNode.parentNode.parentNode.id === "threadlisttableid") {
  30. url = target.querySelector('th>a.xst').href;
  31. } else if (target.nodeName === "TD" && target.parentNode.parentNode.parentNode.id === "threadlisttableid") {
  32. url = target.querySelector('td>a').href;
  33. } else if (target.nodeName === "A" && (target.href.search("thread-") !== -1 || target.href.search("mod=viewthread") !== -1)) {
  34. url = target.href;
  35. event.preventDefault();
  36. } else {
  37. return;
  38. }
  39. document.getElementById('frame').src = url;
  40. history.pushState(null, null, url);
  41. };
  42. } else if (self !== top && location.href.startsWith('https://bbs.saraba1st.com/2b/thread') || (new RegExp("mod=viewthread")).test(location.href)) {
  43. GM_addStyle('#toptb,#hd{display:none}');
  44. }
  45. if (location.href.startsWith('https://bbs.saraba1st.com/2b/thread') || (new RegExp("mod=viewthread")).test(location.href)) {
  46. var td = document.querySelectorAll('.plhin tbody tr:first-child td.pls:first-child');
  47. for (var i in td) {
  48. td[i].rowSpan = "4";
  49. }
  50. GM_addStyle('\
  51. .favatar {\
  52. height: 150px !important;\
  53. overflow: hidden !important;\
  54. }\
  55. .favatar:hover {\
  56. height: auto !important;\
  57. overflow: visible !important;\
  58. }\
  59. .favatar .pi {\
  60. position: absolute;\
  61. }\
  62. .favatar:hover .pi {\
  63. position: initial;\
  64. }\
  65. .favatar .authi {\
  66. background: white;\
  67. padding: 5px;\
  68. }\
  69. .favatar:hover .authi {\
  70. background: none;\
  71. padding: 0;\
  72. }\
  73. .t_fsz {\
  74. min-height: 0 !important;\
  75. }\
  76. .sign {\
  77. max-height: 20px !important;\
  78. padding: 0 !important;\
  79. position: relative;\
  80. width: 600px;\
  81. top: 10px;\
  82. margin-left: 70px;\
  83. margin-bottom: 0 !important;\
  84. background: rgb(246, 247, 235);\
  85. height: 0;\
  86. overflow: visible;\
  87. opacity: 0.01;\
  88. }\
  89. .sign:hover {\
  90. max-height: 200px !important;\
  91. opacity: 1;\
  92. }\
  93. .plhin > tbody > tr:nth-child(1) > td.plc{\
  94. width: 100%; \
  95. }\
  96. .plhin > tbody > tr:nth-child(3) > td:first-child {\
  97. display: none;\
  98. }\
  99. .plhin > tbody > tr:nth-child(3) > td{\
  100. border-bottom: 1px solid #022C80; \
  101. }\
  102. .plhin > tbody > tr:nth-child(4){\
  103. display: none;\
  104. }\
  105. #p_btn {\
  106. padding: 0 !important;\
  107. margin-top: 0 !important;\
  108. margin-bottom: 0 !important;\
  109. }');
  110. }