Google Card-Style UI

Greatly Beautify Google UI!

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

  1. // ==UserScript==
  2. // @name Google Card-Style UI
  3. // @description Greatly Beautify Google UI!
  4. // @author Fei Sun
  5. // @version 1.0.4
  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:#fafafa;\
  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. .g:hover {\
  33. z-index:900;\
  34. }\
  35. .sfbg.nojsv .sfbgg {\
  36. background:white!important;\
  37. }\
  38. #searchform {\
  39. position:fixed!important;\
  40. }\
  41. #top_nav,.appbar {\
  42. box-shadow:0px 1px 2px rgba(0,0,0,0.1);\
  43. }\
  44. .appbar {\
  45. margin-top:59px;\
  46. border-bottom:none;\
  47. }\
  48. #top_nav {\
  49. position:fixed;\
  50. top:59px;\
  51. width:100%;\
  52. z-index:100;\
  53. }\
  54. #cnt {\
  55. width:100%;\
  56. }\
  57. .mw {\
  58. width:100%;\
  59. max-width:100%!important;\
  60. }\
  61. #rcnt {\
  62. width:100%!important;\
  63. padding-left:6%;\
  64. }\
  65. #rcnt .col:nth-child(3) {\
  66. width:65%!important;\
  67. min-width:507px;\
  68. }\
  69. #rcnt .col:nth-child(4) {\
  70. width:25%!important;\
  71. float:left;\
  72. padding-top:6px;\
  73. }\
  74. .kp-blk {\
  75. box-shadow:none;\
  76. }\
  77. #center_col {\
  78. width:100%!important;\
  79. min-width:0px!important;\
  80. margin-left:0px!important;\
  81. padding-top:0px!important;\
  82. }\
  83. #rhscol {\
  84. width:20%!important;\
  85. min-width:200px;\
  86. float:right;\
  87. }\
  88. #rhs {\
  89. margin-left:0px!important;\
  90. }\
  91. .kp-blk._Jw._Rqb._RJe {\
  92. margin:0px!important;\
  93. }\
  94. .s {\
  95. max-width:100%;\
  96. }\
  97. h3.r:after {\
  98. content:'';\
  99. display:block;\
  100. border-top:1px solid #ebebeb;\
  101. height:0px;\
  102. margin-top:5px;\
  103. margin-bottom:5px;\
  104. }\
  105. #center_col .kp-blk {\
  106. margin-left:0px;\
  107. margin-right:0px;\
  108. }\
  109. .kno-ftr {\
  110. margin: 0 -35px 0 -8px;\
  111. padding: 4px 40px 0;\
  112. }\
  113. .related-question-pair>div>div>div>div {\
  114. padding-top:10px!important;\
  115. }\
  116. ._U7g._grf {\
  117. padding-top:10px;\
  118. padding-bottom:10px;\
  119. }\
  120. #extrares {\
  121. background:transparent;\
  122. padding:8px!important;\
  123. }\
  124. #botstuff {\
  125. background:white;\
  126. padding:20px;\
  127. box-shadow:0px 1px 2px rgba(0,0,0,0.1);\
  128. transition:all 0.1s;\
  129. position:relative;\
  130. }\
  131. #botstuff:hover {\
  132. z-index:900;\
  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. a._Eu._H2:hover {\
  147. z-index:900;\
  148. }\
  149. div#bcenter {\
  150. display:none;\
  151. }\
  152. /*remove ads*/\
  153. div#tads {\
  154. display:none;\
  155. }\
  156. div#bottomads {\
  157. display:none;\
  158. }\
  159. img#hplogo {\
  160. box-sizing:content-box;\
  161. }\
  162. ol#ab_ctls * {\
  163. box-sizing:content-box!important;\
  164. }\
  165. </style>";
  166. cssblock.innerHTML=csstext;
  167. (function () {
  168. console.log(window.location.href.search('tbm=isch'));
  169. console.log(window.location.href);
  170. if (window.location.href.search('tbm=isch')==-1) {
  171. document.body.appendChild(cssblock);}
  172. })();
  173. document.body.onhashchange=function () {console.log("d");};