Indeed.com: Design like Stepstone

This script changes the old-fashioned indeed.com design to the modern Stepstone.com design.

目前为 2016-07-13 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Indeed.com: Design like Stepstone
  3. // @namespace https://greasyfork.org/de/scripts/21365
  4. // @description This script changes the old-fashioned indeed.com design to the modern Stepstone.com design.
  5.  
  6. // @include *.indeed.com/*
  7. // @include *.indeed.co.uk/*
  8. // @include *.indeed.*/*
  9. // @include *proxy-us.hide.me/*
  10. // @run-at document-end
  11.  
  12. // @author lukie80
  13. // @copyright Creative Commons Attribution-ShareAlike 3.0 Unported (CC-BY-SA 3.0)
  14. // @license http://creativecommons.org/licenses/by-sa/3.0/
  15. // @version 1.2
  16. // @lastupdated 2016.06.15
  17. //
  18. // ==/UserScript==
  19. //-------------------------------------------------------------------------------------------------------------------
  20.  
  21. //needed for finding sponsored jobs, source: http://stackoverflow.com/a/4275177 - needed
  22. function getElementsStartsWithId( id ) {
  23. var children = document.body.getElementsByTagName('*');
  24. var elements = [], child;
  25. for (var i = 0, length = children.length; i < length; i++) {
  26. child = children[i];
  27. if (child.id.substr(0, id.length) == id)
  28. elements.push(child);
  29. }
  30. return elements;
  31. }
  32.  
  33. //needed for CSS replacement
  34. function addGlobalStyle(css) {
  35. var head, style;
  36. head = document.getElementsByTagName('head')[0];
  37. if (!head) { return; }
  38. style = document.createElement('style');
  39. style.type = 'text/css';
  40. style.innerHTML = css;
  41. head.appendChild(style);
  42. }
  43.  
  44. //replacing CSS
  45. addGlobalStyle("\
  46. *{\
  47. font-family: Trebuchet ms !important; \
  48. }\
  49. body{\
  50. font-family: Trebuchet ms !important; \
  51. color: #0C2577 !important; \
  52. background: linear-gradient(#EFF5FA 0px, #EFF5FA 35px,#FFFFFF 205px) !important; \
  53. } \
  54. a{\
  55. color: #0C2577 !important; \
  56. } \
  57. a:visited{\
  58. color: #666 !important; \
  59. } \
  60. h1{\
  61. color: #0C2577 !important; \
  62. } \
  63. .company{\
  64. color: #1260cf !important; \
  65. } \
  66. .location{\
  67. color: #1260cf !important; \
  68. } \
  69. .summary{\
  70. color: #666 !important; \
  71. } \
  72. .inwrap{\
  73. border-right: none !important; \
  74. border-bottom: none !important; \
  75. } \
  76. .input_text{\
  77. border: thin solid #d4e4f2 !important; \
  78. } \
  79. .new{\
  80. color: #1260cf !important; \
  81. } \
  82. .nji{\
  83. color: #1260cf !important; \
  84. } \
  85. .nji nji recDecoration{\
  86. color: #1260cf !important; \
  87. } \
  88. .more_link{\
  89. color: #1260cf !important; \
  90. } \
  91. .iaLabel{\
  92. color: #1260cf !important; \
  93. } \
  94. .result-link-source{\
  95. color: #1260cf !important; \
  96. } \
  97. .date{\
  98. color: #1260cf !important; \
  99. } \
  100. #what_label_top{\
  101. color: #1260cf !important; \
  102. } \
  103. #where_label_top{\
  104. color: #1260cf !important; \
  105. } \
  106. #g_nav{\
  107. background: #fff !important; \
  108. border-bottom: thin solid #d4e4f2 !important; \
  109. } \
  110. #p_nav{\
  111. background: #fff !important; \
  112. border: none !important; \
  113. } \
  114. .inwrapBorder{\
  115. border: none !important; \
  116. thin solid #d4e4f2 !important; \
  117. } \
  118. .lnav{\
  119. border-spacing: 10px !important; \
  120. } \
  121. #pageContent{\
  122. border-spacing: 10px !important; \
  123. } \
  124. #refineresults{\
  125. background: #eff5fa !important; \
  126. border: thin solid #d4e4f2 !important; \
  127. border-radius: 6px !important; \
  128. padding-top: 17px !important; \
  129. } \
  130. #resultsCol{\
  131. border: thin solid #d4e4f2 !important; \
  132. border-radius: 6px !important; \
  133. background-color: #eff5fa !important; \
  134. } \
  135. #auxCol{\
  136. border: thin solid #d4e4f2 !important; \
  137. border-radius: 6px !important; \
  138. background-color: #eff5fa !important; \
  139. } \
  140. #femp_list{\
  141. padding-right: 10px !important; \
  142. } \
  143. .femp_item{\
  144. border: thin solid #d4e4f2 !important; \
  145. border-radius: 6px !important; \
  146. background-color = #fff !important; \
  147. } \
  148. .separator_top{\
  149. border-top: none !important; \
  150. background: none!important; \
  151. } \
  152. .separator_bottom{\
  153. border-bottom: none !important; \
  154. background: none!important; \
  155. } \
  156. .separator_top{\
  157. border-top: none !important; \
  158. background: none!important; \
  159. } \
  160. .header{\
  161. background-color: #eff5fa !important; \
  162. } \
  163. ");
  164.  
  165. //dynamic style application
  166. document.getElementsByTagName("h1")[0].textContent = "Search: " + document.getElementsByTagName("h1")[0].textContent;
  167.  
  168. var badDivs = getElementsStartsWithId("pj_");
  169. var goodDivs = getElementsStartsWithId("p_");
  170. for (var i = 0; i < goodDivs.length; i++){
  171. if (i % 2 == 0){
  172. goodDivs[i].style.background = '#f9fbfd';
  173. } else {
  174. goodDivs[i].style.background = '#FFFFFF';
  175. }
  176. goodDivs[i].style.border = 'thin solid #d4e4f2';
  177. goodDivs[i].style.margin = "-1px -1px -1px -1px";
  178. //goodDivs[i].style.borderRadius = '6px';
  179. }
  180. for (var i = 0; i < badDivs.length; i++){
  181. badDivs[i].style.background = '#fdf9fd';
  182. badDivs[i].style.border = 'thin solid #f7e6f7';
  183. badDivs[i].style.margin = "-1px -1px -1px -1px";
  184. //badDivs[i].remove();
  185. //this can remove the sponsored jobs but this is not suggested
  186. //because they are not qualitative spam. However they are
  187. //quantitative spam.
  188. }
  189.  
  190. //-------------------------------------------------------------------------------------------------------------------