Google Card-Style UI

Greatly Beautify Google UI!

当前为 2018-09-06 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Google Card-Style UI
  3. // @description Greatly Beautify Google UI!
  4. // @author Fei Sun
  5. // @version 1.2.5
  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. outline:none;
  22. }
  23. div.col,div.col *,div.g {
  24. box-sizing:border-box;
  25. }
  26. .VoEfsd,.g {
  27. box-shadow:0px 1px 2px rgba(0,0,0,0.1);
  28. transition:box-shadow 0.3s;
  29. }
  30. .g {
  31. background:white;
  32. padding:25px;
  33. margin-bottom:15px!important;
  34. margin-right:0px;
  35. position:relative;
  36. }
  37. .VoEfsd:hover,.g:hover {
  38. box-shadow:0px 1px 15px rgba(0,0,0,0.1);
  39. }
  40. .sfbg.nojsv .sfbgg {
  41. background:#fafafa!important;
  42. }
  43. a.fl:link, .fl a, .flt, a.flt, .gl a:link, a.mblink, .mblink b,a:link, .w, #prs a:visited, #prs a:active, .q:active, .q:visited, .kl:active, .tbotu,.xXEKkb {
  44. color:#006621;
  45. }
  46. .RJn8N.xXEKkb.ellip {
  47. color:#006621!important;
  48. }
  49. #searchform {
  50. position:fixed!important;
  51. }
  52. .appbar {
  53. margin-top:59px;
  54. border-bottom:none;
  55. }
  56. .appbar.hdtb-ab-o {
  57. }
  58. #top_nav {
  59. position:fixed;
  60. width:100%;
  61. z-index:100;
  62. }
  63. body.vasq #hdtbMenus.hdtb-td-o {
  64. height:44px;
  65. box-shadow:0px 1px 2px rgba(0,0,0,0.1);
  66. box-sizing:border-box;
  67. }
  68. #cnt {
  69. width:100%;
  70. }
  71. .mw {
  72. width:100%;
  73. max-width:100%!important;
  74. }
  75. #rcnt {
  76. width:100%!important;
  77. box-sizing:border-box;
  78. margin-top:0px;
  79. }
  80. #rcnt .col:nth-of-type(2) {
  81. width:65%!important;
  82. min-width:582px;
  83. margin-left:6%;
  84. }
  85. #rcnt .col:nth-of-type(3) {
  86. width:23%!important;
  87. float:left;
  88. padding-top:6px;
  89. }
  90. #rhs .rhsvw {
  91. width:100%;
  92. }
  93. .kp-blk {
  94. box-shadow:none;
  95. }
  96. #center_col {
  97. width:100%!important;
  98. min-width:0px!important;
  99. margin-left:0px!important;
  100. padding-top:0px!important;
  101. }
  102. #rhscol {
  103. width:20%!important;
  104. min-width:200px;
  105. float:right;
  106. }
  107. #rhs {
  108. margin-left:0px!important;
  109. }
  110. .kp-blk._Jw._Rqb._RJe {
  111. margin:0px!important;
  112. }
  113. .s {
  114. max-width:100%;
  115. }
  116. h3.r:after {
  117. content:'';
  118. display:block;
  119. border-top:1px solid #ebebeb;
  120. height:0px;
  121. margin-top:5px;
  122. margin-bottom:5px;
  123. }
  124. #center_col .kp-blk {
  125. margin-left:0px;
  126. margin-right:0px;
  127. }
  128. .kno-ftr {
  129. margin: 0 -35px 0 -8px;
  130. padding: 4px 40px 0;
  131. }
  132. .related-question-pair>div>div>div>div {
  133. padding-top:10px!important;
  134. }
  135. ._U7g._grf {
  136. padding-top:10px;
  137. padding-bottom:10px;
  138. }
  139. #extrares {
  140. background:transparent;
  141. padding:0px 15px!important;
  142. }
  143. #botstuff {
  144. background:white;
  145. padding:20px;
  146. box-shadow:0px 1px 2px rgba(0,0,0,0.1);
  147. transition:all 0.5s;
  148. position:relative;
  149. }
  150. #botstuff:hover {
  151. box-shadow:0px 1px 15px rgba(0,0,0,0.1);
  152. }
  153. ._Ugf {
  154. overflow:hidden;
  155. }
  156. a._Eu._H2 {
  157. display:block;
  158. width:100%!important;
  159. background:white;
  160. padding:20px;
  161. box-shadow:0px 1px 2px rgba(0,0,0,0.1);
  162. transition:all 0.5s;
  163. position:relative;
  164. }
  165. a._Eu._H2:hover {
  166. box-shadow:0px 1px 15px rgba(0,0,0,0.1);
  167. }
  168. div#bcenter {
  169. display:none;
  170. }
  171. /*remove ads*/
  172. div#tads {
  173. display:none;
  174. }
  175. div#bottomads {
  176. display:none;
  177. }
  178. img#hplogo {
  179. box-sizing:content-box;
  180. }
  181. ol#ab_ctls * {
  182. box-sizing:content-box!important;
  183. }
  184. g-snapping-carousel {
  185. margin-left:12px;
  186. margin-right:12px;
  187. }
  188. #foot {
  189. width:calc(100% - 16px)!important;
  190. margin-left:8px;
  191. box-sizing:border-box;
  192. padding:1px;
  193. }
  194. #fbarcnt {
  195. padding-left:30%;
  196. }
  197. #footcnt {
  198. background:#f2f2f2;
  199. border-top:1px solid #e4e4e4;
  200. }
  201. #fbar {
  202. border-top:none;
  203. min-width:0px;
  204. }
  205. #rhs .kp-blk {
  206. margin:0px;
  207. }
  208. div#subform_ctrl {
  209. margin-top:0px!important;
  210. }
  211. #slim_appbar {
  212. height:44px;
  213. }
  214. #hdtbMenus.hdtb-td-o {
  215. background:#fafafa;
  216. top:59px!important;
  217. }
  218. .appbar {
  219. margin-top:40px;
  220. }
  221. #resultStats {
  222. line-height:44px!important;
  223. }
  224. #res a:link,#extrares a:link {
  225. color:#222!important;
  226. }
  227. #res a:visited,#extrares a:visited {
  228. color:#999!important;
  229. }
  230. #appbar {
  231. background:#fafafa;
  232. }
  233. #res {
  234. padding:0px 15px;
  235. }
  236. div._M6k.vk_c {
  237. width:100%;
  238. margin-left:0px!important;
  239. box-shadow:0px 1px 2px rgba(0,0,0,0.1);
  240. }
  241. div._M6k.vk_c:hover {
  242. box-shadow:1px 1px 15px rgba(0,0,0,0.1);
  243. }
  244. #hdtbSum {
  245. background:#fafafa!important;
  246. }
  247. g-card-grid {
  248. margin:0px;
  249. }
  250. .hdtb-mn-cont {
  251. margin-top:8px;
  252. }
  253. .kno-ftr.rhsvw {
  254. padding-bottom:4px;
  255. }
  256. ._KBh {
  257. background: white;
  258. padding: 25px;
  259. box-shadow: 0px 1px 2px rgba(0,0,0,0.1);
  260. margin-bottom: 15px!important;
  261. margin-right: 0px;
  262. transition: box-shadow 0.5s;
  263. position: relative;
  264. box-sizing:border-box;
  265. width:100%;
  266. margin:0;
  267. }
  268. ._KBh:hover {
  269. box-shadow:0px 1px 15px rgba(0,0,0,0.1);
  270. }
  271. g-more-link *{
  272. color:#222!important;
  273. }
  274. ._Bfp {
  275. width:100%;
  276. margin:0;
  277. }
  278. ._wCh {
  279. padding:0;
  280. }
  281. ._Ncr {
  282. margin:0;
  283. }
  284. .H3O4uc {
  285. margin-left:0;
  286. margin-right:0;
  287. }
  288. .vk_c, .vk_cxp {
  289. margin-left:0;
  290. margin-right:0;
  291. }
  292. .COEoid {
  293. margin:-4px 0;
  294. }
  295. </style>`;
  296. cssblock.innerHTML=csstext;
  297. (function () {
  298. if (window.location.href.search('tbm=isch')==-1) {
  299. document.body.appendChild(cssblock);}
  300. document.getElementById("lst-ib").addEventListener("blur",function () {
  301. document.querySelector("div.gstl_0.sbdd_a").style.cssText='display:none';
  302. });
  303. document.getElementById("lst-ib").addEventListener("focus",function () {
  304. document.querySelector("div.gstl_0.sbdd_a").style.cssText='display:block';
  305. });
  306. })();