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.3
  6. // @include http://*.google.*/*
  7. // @include https://*.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:whitesmoke;\
  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-bottom:1px solid #bbb;\
  101. height:5px;\
  102. margin-bottom:5px;\
  103. }\
  104. #center_col .kp-blk {\
  105. margin-left:0px;\
  106. margin-right:0px;\
  107. }\
  108. .kno-ftr {\
  109. margin: 0 -35px 0 -8px;\
  110. padding: 4px 40px 0;\
  111. }\
  112. .related-question-pair>div>div>div>div {\
  113. padding-top:10px!important;\
  114. }\
  115. ._U7g._grf {\
  116. padding-top:10px;\
  117. padding-bottom:10px;\
  118. }\
  119. #extrares {\
  120. background:transparent;\
  121. padding:8px!important;\
  122. }\
  123. #botstuff {\
  124. background:white;\
  125. padding:20px;\
  126. box-shadow:0px 1px 2px rgba(0,0,0,0.1);\
  127. transition:all 0.1s;\
  128. position:relative;\
  129. }\
  130. #botstuff:hover {\
  131. z-index:900;\
  132. }\
  133. ._Ugf {\
  134. overflow:hidden;\
  135. }\
  136. a._Eu._H2 {\
  137. display:block;\
  138. width:100%!important;\
  139. background:white;\
  140. padding:20px;\
  141. box-shadow:0px 1px 2px rgba(0,0,0,0.1);\
  142. transition:all 0.1s;\
  143. position:relative;\
  144. }\
  145. a._Eu._H2:hover {\
  146. z-index:900;\
  147. }\
  148. div#bcenter {\
  149. display:none;\
  150. }\
  151. /*remove ads*/\
  152. div#tads {\
  153. display:none;\
  154. }\
  155. div#bottomads {\
  156. display:none;\
  157. }\
  158. img#hplogo {\
  159. box-sizing:content-box;\
  160. }\
  161. ol#ab_ctls * {\
  162. box-sizing:content-box!important;\
  163. }\
  164. </style>";
  165. cssblock.innerHTML=csstext;
  166. (function () {
  167. console.log(window.location.href.search('tbm=isch'));
  168. console.log(window.location.href);
  169. if (window.location.href.search('tbm=isch')==-1) {
  170. document.body.appendChild(cssblock);}
  171. })();
  172. document.body.onhashchange=function () {console.log("d");};