Greasy Fork 支持简体中文。

Google Card-Style UI

Greatly Beautify Google UI!

目前為 2017-02-21 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name Google Card-Style UI
  3. // @description Greatly Beautify Google UI!
  4. // @author Fei Sun
  5. // @version 1.2.3
  6. // @include http://www.google.*/*
  7. // @include https://www.google.*/*
  8. // @grant GM_getValue
  9. // @grant GM_setValue
  10. // @grant GM_deleteValue
  11. // @grant GM_xmlhttpRequest
  12. // @namespace https://greasyfork.org/users/35010
  13. // ==/UserScript==
  14. /*jshint multistr: true */
  15. var cssblock=document.createElement("div");
  16. var csstext="<style>body {\
  17. background:#f9f9f9;\
  18. }\
  19. * {\
  20. font-family:'Segoe UI','Microsoft YaHei'!important;\
  21. }\
  22. div.col,div.col *,div.g {\
  23. box-sizing:border-box;\
  24. }\
  25. .g {\
  26. background:white;\
  27. padding:25px;\
  28. box-shadow:0px 1px 2px rgba(0,0,0,0.1);\
  29. margin-bottom:15px!important;\
  30. margin-right:0px;\
  31. transition:box-shadow 0.5s;\
  32. position:relative;\
  33. }\
  34. .g:hover {\
  35. box-shadow:0px 1px 15px rgba(0,0,0,0.1);\
  36. }\
  37. .sfbg.nojsv .sfbgg {\
  38. background:#fafafa!important;\
  39. }\
  40. #searchform {\
  41. position:fixed!important;\
  42. }\
  43. .appbar {\
  44. margin-top:59px;\
  45. border-bottom:none;\
  46. }\
  47. .appbar.hdtb-ab-o {\
  48. }\
  49. #top_nav {\
  50. position:fixed;\
  51. width:100%;\
  52. z-index:100;\
  53. }\
  54. body.vasq #hdtbMenus.hdtb-td-o {\
  55. height:44px;\
  56. box-shadow:0px 1px 2px rgba(0,0,0,0.1);\
  57. box-sizing:border-box;\
  58. }\
  59. #cnt {\
  60. width:100%;\
  61. }\
  62. .mw {\
  63. width:100%;\
  64. max-width:100%!important;\
  65. }\
  66. #rcnt {\
  67. width:100%!important;\
  68. box-sizing:border-box;\
  69. margin-top:0px;\
  70. }\
  71. #rcnt .col:nth-of-type(2) {\
  72. width:65%!important;\
  73. min-width:582px;\
  74. margin-left:6%;\
  75. }\
  76. #rcnt .col:nth-of-type(3) {\
  77. width:23%!important;\
  78. float:left;\
  79. padding-top:6px;\
  80. }\
  81. #rhs .rhsvw {\
  82. width:100%;\
  83. }\
  84. .kp-blk {\
  85. box-shadow:none;\
  86. }\
  87. #center_col {\
  88. width:100%!important;\
  89. min-width:0px!important;\
  90. margin-left:0px!important;\
  91. padding-top:0px!important;\
  92. }\
  93. #rhscol {\
  94. width:20%!important;\
  95. min-width:200px;\
  96. float:right;\
  97. }\
  98. #rhs {\
  99. margin-left:0px!important;\
  100. }\
  101. .kp-blk._Jw._Rqb._RJe {\
  102. margin:0px!important;\
  103. }\
  104. .s {\
  105. max-width:100%;\
  106. }\
  107. h3.r:after {\
  108. content:'';\
  109. display:block;\
  110. border-top:1px solid #ebebeb;\
  111. height:0px;\
  112. margin-top:5px;\
  113. margin-bottom:5px;\
  114. }\
  115. #center_col .kp-blk {\
  116. margin-left:0px;\
  117. margin-right:0px;\
  118. }\
  119. .kno-ftr {\
  120. margin: 0 -35px 0 -8px;\
  121. padding: 4px 40px 0;\
  122. }\
  123. .related-question-pair>div>div>div>div {\
  124. padding-top:10px!important;\
  125. }\
  126. ._U7g._grf {\
  127. padding-top:10px;\
  128. padding-bottom:10px;\
  129. }\
  130. #extrares {\
  131. background:transparent;\
  132. padding:0px 15px!important;\
  133. }\
  134. #botstuff {\
  135. background:white;\
  136. padding:20px;\
  137. box-shadow:0px 1px 2px rgba(0,0,0,0.1);\
  138. transition:all 0.5s;\
  139. position:relative;\
  140. }\
  141. #botstuff:hover {\
  142. box-shadow:0px 1px 15px rgba(0,0,0,0.1);\
  143. }\
  144. ._Ugf {\
  145. overflow:hidden;\
  146. }\
  147. a._Eu._H2 {\
  148. display:block;\
  149. width:100%!important;\
  150. background:white;\
  151. padding:20px;\
  152. box-shadow:0px 1px 2px rgba(0,0,0,0.1);\
  153. transition:all 0.5s;\
  154. position:relative;\
  155. }\
  156. a._Eu._H2:hover {\
  157. box-shadow:0px 1px 15px rgba(0,0,0,0.1);\
  158. }\
  159. div#bcenter {\
  160. display:none;\
  161. }\
  162. /*remove ads*/\
  163. div#tads {\
  164. display:none;\
  165. }\
  166. div#bottomads {\
  167. display:none;\
  168. }\
  169. img#hplogo {\
  170. box-sizing:content-box;\
  171. }\
  172. ol#ab_ctls * {\
  173. box-sizing:content-box!important;\
  174. }\
  175. g-snapping-carousel {\
  176. margin-left:12px;\
  177. margin-right:12px;\
  178. }\
  179. #foot {\
  180. width:calc(100% - 16px)!important;\
  181. margin-left:8px;\
  182. box-sizing:border-box;\
  183. padding:1px;\
  184. }\
  185. #fbarcnt {\
  186. padding-left:30%;\
  187. }\
  188. #footcnt {\
  189. background:#f2f2f2;\
  190. border-top:1px solid #e4e4e4;\
  191. }\
  192. #fbar {\
  193. border-top:none;\
  194. min-width:0px;\
  195. }\
  196. #rhs .kp-blk {\
  197. margin:0px;\
  198. }\
  199. div#subform_ctrl {\
  200. margin-top:0px!important;\
  201. }\
  202. #slim_appbar {\
  203. height:44px;\
  204. }\
  205. #hdtbMenus.hdtb-td-o {\
  206. background:#fafafa;\
  207. top:59px!important;\
  208. }\
  209. .appbar {\
  210. margin-top:40px;\
  211. }\
  212. #resultStats {\
  213. line-height:44px!important;\
  214. }\
  215. #res a:link,#extrares a:link {\
  216. color:#222!important;\
  217. }\
  218. #res a:visited,#extrares a:visited {\
  219. color:#999!important;\
  220. }\
  221. #appbar {\
  222. background:#fafafa;\
  223. }\
  224. #res {\
  225. padding:0px 15px;\
  226. }\
  227. div._M6k.vk_c {\
  228. width:100%;\
  229. margin-left:0px!important;\
  230. box-shadow:0px 1px 2px rgba(0,0,0,0.1);\
  231. }\
  232. div._M6k.vk_c:hover {\
  233. box-shadow:1px 1px 15px rgba(0,0,0,0.1);\
  234. }\
  235. #hdtbSum {\
  236. background:#fafafa!important;\
  237. }\
  238. g-card-grid {\
  239. margin:0px;\
  240. }\
  241. .hdtb-mn-cont {\
  242. margin-top:8px;\
  243. }\
  244. .kno-ftr.rhsvw {\
  245. padding-bottom:4px;\
  246. }\
  247. </style>";
  248. cssblock.innerHTML=csstext;
  249. (function () {
  250. if (window.location.href.search('tbm=isch')==-1) {
  251. document.body.appendChild(cssblock);}
  252. document.getElementById("lst-ib").addEventListener("blur",function () {
  253. document.querySelector("div.gstl_0.sbdd_a").style.cssText='display:none';
  254. });
  255. document.getElementById("lst-ib").addEventListener("focus",function () {
  256. document.querySelector("div.gstl_0.sbdd_a").style.cssText='display:block';
  257. });
  258. })();