This script changes the old-fashioned indeed.com design to the modern Stepstone.com design.
当前为
// ==UserScript==
// @name Indeed.com: Design like Stepstone
// @namespace https://greasyfork.org/de/scripts/21365
// @description This script changes the old-fashioned indeed.com design to the modern Stepstone.com design.
// @include *.indeed.com/*
// @include *.indeed.co.uk/*
// @include *.indeed.*/*
// @include *proxy-us.hide.me/*
// @run-at document-end
// @author lukie80
// @copyright Creative Commons Attribution-ShareAlike 3.0 Unported (CC-BY-SA 3.0)
// @license http://creativecommons.org/licenses/by-sa/3.0/
// @version 1.1
// @lastupdated 2016.07.13
//
// ==/UserScript==
//-------------------------------------------------------------------------------------------------------------------
//needed for finding sponsored jobs, source: http://stackoverflow.com/a/4275177 - needed
function getElementsStartsWithId( id ) {
var children = document.body.getElementsByTagName('*');
var elements = [], child;
for (var i = 0, length = children.length; i < length; i++) {
child = children[i];
if (child.id.substr(0, id.length) == id)
elements.push(child);
}
return elements;
}
//needed for CSS replacement
function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName('head')[0];
if (!head) { return; }
style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
}
//replacing CSS
addGlobalStyle("\
*{\
font-family: Trebuchet ms !important; \
}\
body{\
font-family: Trebuchet ms !important; \
color: #0C2577 !important; \
background: linear-gradient(#EFF5FA 0px, #EFF5FA 35px,#FFFFFF 205px) !important; \
} \
a{\
color: #0C2577 !important; \
} \
a:visited{\
color: #666 !important; \
} \
.company{\
color: #1260cf !important; \
} \
.location{\
color: #1260cf !important; \
} \
.summary{\
color: #666 !important; \
} \
.inwrap{\
border-right: none !important; \
border-bottom: none !important; \
} \
.input_text{\
border: thin solid #d4e4f2 !important; \
} \
.new{\
color: #1260cf !important; \
} \
.nji{\
color: #1260cf !important; \
} \
.nji nji recDecoration{\
color: #1260cf !important; \
} \
.more_link{\
color: #1260cf !important; \
} \
.iaLabel{\
color: #1260cf !important; \
} \
.result-link-source{\
color: #1260cf !important; \
} \
.date{\
color: #1260cf !important; \
} \
#what_label_top{\
color: #1260cf !important; \
} \
#where_label_top{\
color: #1260cf !important; \
} \
#g_nav{\
background: #fff !important; \
border-bottom: thin solid #d4e4f2 !important; \
} \
#p_nav{\
background: #fff !important; \
border: none !important; \
} \
.inwrapBorder{\
border: none !important; \
thin solid #d4e4f2 !important; \
} \
.lnav{\
border-spacing: 10px !important; \
} \
#pageContent{\
border-spacing: 10px !important; \
} \
#refineresults{\
background: #eff5fa !important; \
border: thin solid #d4e4f2 !important; \
border-radius: 6px !important; \
padding-top: 17px !important; \
} \
#resultsCol{\
border: thin solid #d4e4f2 !important; \
border-radius: 6px !important; \
background-color: #eff5fa !important; \
} \
#auxCol{\
border: thin solid #d4e4f2 !important; \
border-radius: 6px !important; \
background-color = #eff5fa !important; \
} \
#femp_list{\
padding-right: 10px !important; \
} \
.femp_item{\
border: thin solid #d4e4f2 !important; \
border-radius: 6px !important; \
background-color = #fff !important; \
} \
");
//dynamic style application
document.getElementsByTagName("h1")[0].textContent = "Search: " + document.getElementsByTagName("h1")[0].textContent;
var badDivs = getElementsStartsWithId("pj_");
var goodDivs = getElementsStartsWithId("p_");
for (var i = 0; i < goodDivs.length; i++){
if (i % 2 == 0){
goodDivs[i].style.background = '#f9fbfd';
} else {
goodDivs[i].style.background = '#FFFFFF';
}
goodDivs[i].style.border = 'thin solid #d4e4f2';
goodDivs[i].style.margin = "-1px -1px -1px -1px";
//goodDivs[i].style.borderRadius = '6px';
}
for (var i = 0; i < badDivs.length; i++){
badDivs[i].style.background = '#fdf9fd';
badDivs[i].style.border = 'thin solid #f7e6f7';
badDivs[i].style.margin = "-1px -1px -1px -1px";
//badDivs[i].remove();
//this can remove the sponsored jobs but this is not suggested
//because they are not qualitative spam. However they are
//quantitative spam.
}
//-------------------------------------------------------------------------------------------------------------------