GreasyFork Plus

Improves the layout of gf.qytechs.cn

  1. // ==UserScript==
  2. // @name GreasyFork Plus
  3. // @namespace 407d4100-4661-11e4-916c-0800200c9a66
  4. // @description Improves the layout of gf.qytechs.cn
  5. // @include *://gf.qytechs.cn*
  6. // @include *://*.sleazyfork.org*
  7. // @version 1.1.2
  8. // @grant GM_addStyle
  9. // ==/UserScript==
  10. GM_addStyle("\
  11. body>.notice {\
  12. width: 920px;\
  13. font-weight: bold;\
  14. margin: 16px auto -10px;\
  15. }\
  16. body {\
  17. background: #F1F1F1;\
  18. }\
  19. a {\
  20. color: #167AC6;\
  21. text-decoration: none;\
  22. }\
  23. a:hover {\
  24. text-decoration: underline;\
  25. }\
  26. ");
  27. if(document.location.href.indexOf("gf.qytechs.cn/scripts") > -1) {
  28. GM_addStyle("\
  29. #browse-script-list {\
  30. margin-top: 0px;\
  31. font-size: 0px;\
  32. }\
  33. #browse-script-list li {\
  34. margin: 0px;\
  35. }\
  36. article {\
  37. padding: 6px 12px;\
  38. width: 920px;\
  39. margin: 0px auto;\
  40. border: 1px solid #E2E2E2;\
  41. border-bottom: 0px;\
  42. background: #FFFFFF;\
  43. }\
  44. article h2 .name-description-separator {\
  45. display: none;\
  46. }\
  47. article h2 .description {\
  48. display: block;\
  49. }\
  50. article dl {\
  51. display: none;\
  52. }\
  53. article .description {\
  54. font-size: 14px;\
  55. }\
  56. .pagination {\
  57. padding: 16px 212px 6px;\
  58. height: 30px;\
  59. width: 520px;\
  60. background: #FFFFFF;\
  61. border: 1px solid #E2E2E2;\
  62. border-top: 0px;\
  63. margin: 0px auto;\
  64. -webkit-border-bottom-left-radius: 6px;\
  65. -webkit-border-bottom-right-radius: 6px;\
  66. -moz-border-radius-bottomleft: 6px;\
  67. -moz-border-radius-bottomright: 6px;\
  68. border-bottom-left-radius: 6px;\
  69. border-bottom-right-radius: 6px;\
  70. }\
  71. .pagination .current {\
  72. font-style: normal;\
  73. font-weight: bold;\
  74. }\
  75. .pagination a:last-child {\
  76. float: right;\
  77. }\
  78. body>p {\
  79. display: none;\
  80. }\
  81. body>ol li:last-child article {\
  82. border-bottom: 1px solid #E2E2E2;\
  83. }\
  84. #script-list-option-groups {\
  85. float: none;\
  86. width: 920px;\
  87. margin: 16px auto 0px;\
  88. padding: 6px 12px;\
  89. background: #FFFFFF;\
  90. border: 1px solid #E2E2E2;\
  91. border-bottom: 0px;\
  92. -webkit-border-top-left-radius: 6px;\
  93. -webkit-border-top-right-radius: 6px;\
  94. -moz-border-radius-topleft: 6px;\
  95. -moz-border-radius-topright: 6px;\
  96. border-top-left-radius: 6px;\
  97. border-top-right-radius: 6px;\
  98. }\
  99. #script-list-option-groups #script-list-filter {\
  100. display: none;\
  101. }\
  102. #script-list-option-groups #script-list-sort {\
  103. padding: 0px;\
  104. background: none;\
  105. height: 40px;\
  106. }\
  107. #script-list-option-groups #script-list-sort li {\
  108. display: block;\
  109. float: left;\
  110. width: 12%;\
  111. text-align: center;\
  112. font-size: 14px;\
  113. margin: 12px auto;\
  114. }\
  115. #script-list-option-groups #script-list-sort {\
  116. font-size: 0px;\
  117. }\
  118. \
  119. #script-content {\
  120. border: 1px solid #E1E1E1;\
  121. background: #FFFFFF;\
  122. width: 920px;\
  123. margin: 0px auto 16px;\
  124. padding: 12px;\
  125. -webkit-border-radius: 6px;\
  126. -moz-border-radius: 6px;\
  127. border-radius: 6px;\
  128. }\
  129. #script-info header h2, #script-info header p {\
  130. margin: 6px auto;\
  131. width: 920px;\
  132. }\
  133. #script-links {\
  134. width: 920px;\
  135. margin: 0px auto;\
  136. }\
  137. #script-links li {\
  138. border-color: #E1E1E1;\
  139. -webkit-border-top-left-radius: 2px;\
  140. -webkit-border-top-right-radius: 2px;\
  141. -moz-border-radius-topleft: 2px;\
  142. -moz-border-radius-topright: 2px;\
  143. border-top-left-radius: 2px;\
  144. border-top-right-radius: 2px;\
  145. }\
  146. #install-stats-chart-container {\
  147. display: none;\
  148. }\
  149. #additional-info div {\
  150. background: none;\
  151. padding: 0px;\
  152. padding-top: 6px;\
  153. }\
  154. ");
  155. if(document.location.href.indexOf("-") == -1 || document.location.href.indexOf("/by-site/") > -1) { // Applies only on search results (not script pages)
  156. document.body.children[3].children[0].innerHTML = "◀";
  157. document.body.children[3].lastChild.innerHTML = "▶";
  158. document.body.children[3].innerHTML += "<a href='/script_versions/new'>Post a script</a>";
  159. document.getElementById("script-list-sort").children[0].innerHTML += "\n<li class='script-list-option'><a href='/scripts/by-site'>By site</a></li>";
  160. }
  161. }
  162. else if(document.location.href.indexOf("greasemonkey.org/forum/") == -1) {
  163. var el, wrapper = document.createElement('div');
  164. wrapper.id = "wrapper";
  165. while (el = document.body.children[1]) {
  166. wrapper.appendChild(el);
  167. }
  168. document.body.appendChild(wrapper);
  169. GM_addStyle("\
  170. #wrapper {\
  171. width: 920px;\
  172. padding: 6px 12px;\
  173. background: #FFFFFF;\
  174. margin: 16px auto;\
  175. border: 1px solid #E1E1E1;\
  176. -webkit-border-radius: 6px;\
  177. -moz-border-radius: 6px;\
  178. border-radius: 6px;\
  179. }\
  180. #script-list-option-groups {\
  181. display: none;\
  182. }\
  183. ");
  184. if(document.location.href.indexOf("gf.qytechs.cn/users/") > -1) {
  185. GM_addStyle("\
  186. #wrapper {\
  187. padding-top: 0px;\
  188. }\
  189. #control-panel {\
  190. width: 920px;\
  191. padding: 6px 12px;\
  192. margin: 6px auto 0px;\
  193. height: 40px;\
  194. -webkit-border-top-left-radius: 6px;\
  195. -webkit-border-top-right-radius: 6px;\
  196. -moz-border-radius-topleft: 6px;\
  197. -moz-border-radius-topright: 6px;\
  198. border-top-left-radius: 6px;\
  199. border-top-right-radius: 6px;\
  200. background: #FFFFFF;\
  201. border: 1px solid #E1E1E1;\
  202. border-bottom: 0px;\
  203. }\
  204. #control-panel header {\
  205. display: none;\
  206. }\
  207. #user-control-panel li {\
  208. margin-top: -6px;\
  209. display:block;\
  210. float: left;\
  211. width: 14%;\
  212. text-align: center;\
  213. }\
  214. article h2 .name-description-separator {\
  215. display: none;\
  216. }\
  217. article h2 .description {\
  218. display: block;\
  219. }\
  220. article dl {\
  221. display: none;\
  222. }\
  223. article .description {\
  224. font-size: 14px;\
  225. }\
  226. h2 {\
  227. width: 920px;\
  228. font-size: 32px;\
  229. margin: 6px auto;\
  230. }\
  231. ");
  232. document.body.appendChild(document.getElementById("wrapper").children[0]);
  233. document.body.appendChild(document.getElementById("wrapper")); // Sets the element to the bottom of its list of siblings
  234. if(document.getElementById("user-control-panel")) { // If signed in
  235. document.body.appendChild(document.getElementById("control-panel"));
  236. document.body.appendChild(document.getElementById("wrapper"));
  237. GM_addStyle("\
  238. #wrapper {\
  239. margin-top: 0px;\
  240. -webkit-border-top-left-radius: 0px;\
  241. -webkit-border-top-right-radius: 0px;\
  242. -moz-border-radius-topleft: 0px;\
  243. -moz-border-radius-topright: 0px;\
  244. border-top-left-radius: 0px;\
  245. border-top-right-radius: 0px;\
  246. }\
  247. ");
  248. document.getElementById("user-control-panel").children[3].children[0].innerHTML = "GH Webhook";
  249. document.getElementById("user-control-panel").children[5].children[0].innerHTML = "Sign in methods";
  250. }
  251. }
  252. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址