Google Card-Style UI

Greatly Beautify Google UI!

当前为 2016-04-07 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Google Card-Style UI
  3. // @description Greatly Beautify Google UI!
  4. // @author Fei Sun
  5. // @version 1.0.6
  6. // @include http://www.google.*/*
  7. // @include https://www.google.*/*
  8. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
  9. // @grant GM_getValue
  10. // @grant GM_setValue
  11. // @grant GM_deleteValue
  12. // @grant GM_xmlhttpRequest
  13. // @namespace https://greasyfork.org/users/35010
  14. // ==/UserScript==
  15. var cssblock=document.createElement("div");
  16. /*jshint multistr: true */
  17. var csstext="<style>body {\
  18. background:#f9f9f9;\
  19. }\
  20. * {\
  21. font-family:'Segoe UI','Microsoft YaHei'!important;\
  22. box-sizing:border-box;\
  23. }\
  24. .g {\
  25. background:white;\
  26. padding:20px;\
  27. box-shadow:0px 1px 2px rgba(0,0,0,0.1);\
  28. margin-bottom:10px!important;\
  29. transition:all 0.1s;\
  30. position:relative;\
  31. }\
  32. .sfbg.nojsv .sfbgg {\
  33. background:white!important;\
  34. }\
  35. #searchform {\
  36. position:fixed!important;\
  37. }\
  38. #top_nav,.appbar {\
  39. box-shadow:0px 1px 2px rgba(0,0,0,0.1);\
  40. }\
  41. .appbar {\
  42. margin-top:59px;\
  43. border-bottom:none;\
  44. }\
  45. .appbar.hdtb-ab-o {\
  46. }\
  47. #top_nav {\
  48. position:fixed;\
  49. top:59px;\
  50. width:100%;\
  51. z-index:100;\
  52. }\
  53. body.vasq #hdtbMenus.hdtb-td-o {\
  54. height:44px;\
  55. box-shadow:0px 1px 2px rgba(0,0,0,0.1);\
  56. }\
  57. #cnt {\
  58. width:100%;\
  59. }\
  60. .mw {\
  61. width:100%;\
  62. max-width:100%!important;\
  63. }\
  64. #rcnt {\
  65. width:100%!important;\
  66. padding-left:6%;\
  67. }\
  68. #rcnt .col:nth-child(3) {\
  69. width:65%!important;\
  70. min-width:507px;\
  71. }\
  72. #rcnt .col:nth-child(4) {\
  73. width:25%!important;\
  74. float:left;\
  75. padding-top:6px;\
  76. }\
  77. .kp-blk {\
  78. box-shadow:none;\
  79. }\
  80. #center_col {\
  81. width:100%!important;\
  82. min-width:0px!important;\
  83. margin-left:0px!important;\
  84. padding-top:0px!important;\
  85. }\
  86. #rhscol {\
  87. width:20%!important;\
  88. min-width:200px;\
  89. float:right;\
  90. }\
  91. #rhs {\
  92. margin-left:0px!important;\
  93. }\
  94. .kp-blk._Jw._Rqb._RJe {\
  95. margin:0px!important;\
  96. }\
  97. .s {\
  98. max-width:100%;\
  99. }\
  100. h3.r:after {\
  101. content:'';\
  102. display:block;\
  103. border-top:1px solid #ebebeb;\
  104. height:0px;\
  105. margin-top:5px;\
  106. margin-bottom:5px;\
  107. }\
  108. #center_col .kp-blk {\
  109. margin-left:0px;\
  110. margin-right:0px;\
  111. }\
  112. .kno-ftr {\
  113. margin: 0 -35px 0 -8px;\
  114. padding: 4px 40px 0;\
  115. }\
  116. .related-question-pair>div>div>div>div {\
  117. padding-top:10px!important;\
  118. }\
  119. ._U7g._grf {\
  120. padding-top:10px;\
  121. padding-bottom:10px;\
  122. }\
  123. #extrares {\
  124. background:transparent;\
  125. padding:8px!important;\
  126. }\
  127. #botstuff {\
  128. background:white;\
  129. padding:20px;\
  130. box-shadow:0px 1px 2px rgba(0,0,0,0.1);\
  131. transition:all 0.1s;\
  132. position:relative;\
  133. }\
  134. ._Ugf {\
  135. overflow:hidden;\
  136. }\
  137. a._Eu._H2 {\
  138. display:block;\
  139. width:100%!important;\
  140. background:white;\
  141. padding:20px;\
  142. box-shadow:0px 1px 2px rgba(0,0,0,0.1);\
  143. transition:all 0.1s;\
  144. position:relative;\
  145. }\
  146. div#bcenter {\
  147. display:none;\
  148. }\
  149. /*remove ads*/\
  150. div#tads {\
  151. display:none;\
  152. }\
  153. div#bottomads {\
  154. display:none;\
  155. }\
  156. img#hplogo {\
  157. box-sizing:content-box;\
  158. }\
  159. ol#ab_ctls * {\
  160. box-sizing:content-box!important;\
  161. }\
  162. </style>";
  163. cssblock.innerHTML=csstext;
  164. (function () {
  165. console.log(window.location.href.search('tbm=isch'));
  166. console.log(window.location.href);
  167. if (window.location.href.search('tbm=isch')==-1) {
  168. document.body.appendChild(cssblock);}
  169. })();
  170. document.body.onhashchange=function () {console.log("d");};