Two Column S1

two colomn ui for s1

目前为 2016-10-31 提交的版本。查看 最新版本

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