Job Description
Inject the flag directly into the main browser window and the session.
window.isSFInternalUser = true;
sessionStorage.setItem(‘SF_Internal_User’, ‘true’);
/
•JOB PAGE ENHANCEMENT SCRIPT
•This script intercepts the default SAP SuccessFactors job layout, extracts key job metadata
•(tokens), evaluates business rules to show/hide specific data (like salary), and rebuilds
•the UI into a modern, 3-column green grid with custom icons.
•/
document.addEventListener(‘DOMContentLoaded’, function () {
1.PAGE VALIDATION
Ensure this script only runs on the actual Job Description page, not search or home pages.
if (document.querySelector(’.job-page’)) {
let columnOne = document.querySelector(’.jobColumnOne’);
if (!columnOne) return; Exit if the primary content column is missing
2.TITLE EXTRACTION & REFORMATTING
Find the native job title element, extract its text, and remove the native wrapper.
let titleElement = columnOne.querySelector(‘span[itemprop=“title”]’);
let titleText = titleElement ? titleElement.textContent.trim() : ‘’;
if (titleElement) {
Locate the highest level wrapper SAP generated for the title and remove it
let titleWrapper = titleElement.closest(’.joblayouttoken’) || titleElement.closest(’.inner’);
if (titleWrapper) titleWrapper.remove();
}
Inject the new custom HTML structure at the very top of the job column.
This includes the new H1 title and the empty green container/grid for the tokens.
columnOne.insertAdjacentHTML(‘afterbegin’, `
${titleText}
`);
Reference to the newly injected grid where we will move the tokens
let grid = columnOne.querySelector(’.job-grid’);
3.TOKEN GATHERING
SAP dynamically wraps tokens in different ways (.inner, .joblayouttoken, etc.).
We find all labels first, then traverse up the DOM to capture the full container for each.
let labels = Array.from(columnOne.querySelectorAll(’.joblayouttoken-label’));
let allTokens = labels.map(label =>label.closest(’.inner’) || label.closest(’.joblayouttoken’) || label.parentElement.parentElement);
allTokens = […new Set(allTokens)]; Remove duplicates to prevent processing the same element twice
Variables to store extracted data for our business rules
let jobLocationValue = “”;
let countryRegionValue = “”;
let regionValue = “”;
let jobLevelValue = “”;
let employeeGroupValue = “”;
4.PHASE 1: DATA EXTRACTION (SILENT)
Loop through all tokens just to read their values. We do not move or alter them yet.
allTokens.forEach(el =>{
if(!el) return;
let labelEl = el.querySelector(’.joblayouttoken-label’);
if (!labelEl) return;
let labelText = labelEl.innerText;
Use our helper function to normalize the label name regardless of the user’s language
let propId = generatePropertyId(labelText);
let valueEl = el.querySelector(’.rtltextaligneligible’);
let valueText = valueEl ? valueEl.textContent.trim() : “”;
Populate the business rule variables based on the identified property ID
if (propId === “JobLocation”) jobLocationValue = valueText;
else if (propId === “CountryRegion”) countryRegionValue = valueText;
else if (propId === “Region”) regionValue = valueText;
else if (propId === “JobLevel”) jobLevelValue = valueText.toUpperCase().trim();
else if (propId === “EmployeeGroup”) employeeGroupValue = valueText.toLowerCase();
});
5.DATA FALLBACK: JOB DESCRIPTION PARSING
If SAP failed to generate specific tokens, attempt to regex them directly out of the raw description text.
let descDiv = document.querySelector(’.job-description’) || columnOne.querySelector(’[itemprop=“description”]’);
if (descDiv) {
let descText = descDiv.innerText || “”;
if (!employeeGroupValue) {
let eg = descText.match(/Employee Group:\s*([^\n]+)/i);
if (eg) employeeGroupValue = eg[1].toLowerCase().trim();
}
if (!countryRegionValue) {
let cr = descText.match(/Country:\s*([^\n]+)/i);
if (cr) countryRegionValue = cr[1].toLowerCase().trim();
}
if (!regionValue) {
let rg = descText.match(/Region:\s*([^\n]+)/i);
if (rg) regionValue = rg[1].toLowerCase().trim();
}
if (!jobLevelValue) {
let jl = descText.match(/Job Level:\s*([^\n]+)/i);
Ensure we don’t accidentally grab “Job Experience Level”
if (jl && !jl[0].toLowerCase().includes(“experience”)) {
jobLevelValue = jl[1].toUpperCase().trim();
}
}
}
6.BUSINESS RULES EVALUATION (SALARY VISIBILITY)
Rule A: Is it a salaried position?
let isSalaryPaid = employeeGroupValue.includes(‘salary’);
Rule B: Is the Job Level eligible? (Hide if PL09 or higher, or if ZZ)
let isJobLevelSalaryEligible = true;
let plMatch = jobLevelValue.match(/PL(\d+)/);
if (jobLevelValue.includes(“ZZ”)) {
isJobLevelSalaryEligible = false;
} else if (plMatch && parseInt(plMatch[1], 10) >= 9) {
isJobLevelSalaryEligible = false;
}
Combine city/state and country to check geographic eligibility
let fullLocationLower = (jobLocationValue + " " + countryRegionValue).toLowerCase();
let isUSJob = fullLocationLower.includes(“usa”) || fullLocationLower.includes(“united states”) || /\bus\b/.test(fullLocationLower);
Define specifically allowed locations for salary transparency compliance
let allowedUSStates = [“massachusetts”, “illinois”, “colorado”, “minnesota”, “new york”, “oregon”, “ohio”, “california”, “washington”, “nevada”, “maryland”, “new jersey”];
let allowedUSAbbr = [“ma”, “il”, “co”, “mn”, “ny”, “or”, “oh”, “ca”, “wa”, “nv”, “md”, “nj”, “wdc”, “dc”];
let allowedGlobalCountries = [“canada”];
let isSalaryLocationValid = false;
Rule C: Is the location mandated to show salary?
if (isUSJob) {
isSalaryLocationValid = allowedUSStates.some(state =>fullLocationLower.includes(state)) ||
allowedUSAbbr.some(abbr =>new RegExp(\\b${abbr}\\b).test(fullLocationLower));
} else {
isSalaryLocationValid = allowedGlobalCountries.some(country =>fullLocationLower.includes(country));
}
Final Boolean: All three rules must pass to display the salary range token
let showSalaryRange = isSalaryLocationValid && isJobLevelSalaryEligible && isSalaryPaid;
7.PHASE 2: UI MANIPULATION & DOM INJECTION
Loop through all tokens again. This time, we apply styles, icons, and move them into the new grid.
allTokens.forEach(el =>{
try {
Skip processing if this container accidentally holds the main job description
if (!el || el.querySelector(’[itemprop=“description”]’)) return;
let labelEl = el.querySelector(’.joblayouttoken-label’);
if (!labelEl) return;
let labelText = labelEl.innerText;
let customPropertyid = generatePropertyId(labelText);
Hide utility tokens that were only needed for backend business logic calculations
if ([“EmployeeGroup”, “CountryRegion”, “Region”, “JobLevel”].includes(customPropertyid)) {
el.style.display = ‘none’;
return;
}
Hide the salary token if it failed the business rule check
if (customPropertyid === “SalaryRange” && !showSalaryRange) {
el.style.display = ‘none’;
return;
}
TEXT OVERRIDES: Force specific terminology on the frontend
if (customPropertyid === “SalaryRange” && labelText.toLowerCase().includes(“recruitment salary range”)) {
labelEl.innerText = labelText.replace(/Recruitment Salary Range/ig, “Annual Salary Range”);
}
Cleanup messy abbreviations from SAP
if (labelText.includes("(Short)")) {
labelEl.innerText = labelText.replace(/(Short)/g, “(s)”);
}
BRUTE FORCE STYLING: Override SAP’s native CSS for the Labels
labelEl.style.setProperty(‘font-weight’, ‘bold’, ‘important’);
labelEl.style.setProperty(‘font-size’, ‘14px’, ‘important’);
labelEl.style.setProperty(‘color’, ‘#303030’, ‘important’);
labelEl.style.setProperty(‘font-family’, ‘Verdana, Geneva, sans-serif’, ‘important’);
BRUTE FORCE STYLING: Override SAP’s native CSS for the Values
let valueEl = el.querySelector(’.rtltextaligneligible’);
if (valueEl) {
valueEl.style.setProperty(‘font-weight’, ‘normal’, ‘important’);
valueEl.style.setProperty(‘font-size’, ‘15px’, ‘important’);
valueEl.style.setProperty(‘color’, ‘#303030’, ‘important’);
valueEl.style.setProperty(‘font-family’, ‘Verdana, Geneva, sans-serif’, ‘important’);
}
ICON MAPPING: Assign specific Glyphicons or custom image URLs based on the token type
let icon = ‘’;
let iconUrl = ‘’;
switch (customPropertyid) {
case ‘JobLocation’: icon = ‘glyphicon-map-marker’; break;
case ‘BusinessUnit’: icon = ‘glyphicon-briefcase’; break;
case ‘JobCategory’: icon = ‘glyphicon-dashboard’; break;
case ‘EmploymentType’: icon = ‘glyphicon-star-empty’; break;
case ‘ReqID’: icon = ‘glyphicon-calendar’; break;
case ‘WorkLocationType’: icon = ‘glyphicon-paste’; break;
case ‘JobExperienceLevel’: iconUrl = ‘https:rmkcdn.successfactors.com/ef55fddb/b4cf3492-3cb2-4e29-a914-3.png’; break;
case ‘SalaryRange’: iconUrl = ‘https:rmkcdn.successfactors.com/ef55fddb/3bd06ab1-e5dc-4e72-abcb-3.png’; break;
case ‘TAPartner’: iconUrl = ‘https:rmkcdn.successfactors.com/ef55fddb/66a66419-f8c9-4f0e-b94a-6.png’; break;
}
Generate the HTML for the icon (either a span for a font-icon or an img tag)
let iconHtml = ‘’;
if (icon) {
iconHtml = ; } else if (iconUrl) { iconHtml = ;
}
SAFE DOM MANIPULATION
Wrap the existing token and the new icon inside a flexible flexbox row container.
We use DOM traversal (previousElementSibling) to avoid using dynamic ID queries which can fail if SAP injects weird characters.
let containerToWrap = labelEl.parentElement;
if(containerToWrap) {
containerToWrap.insertAdjacentHTML(‘beforebegin’, ${iconHtml});
let wrapper = containerToWrap.previousElementSibling;
if(wrapper) {
wrapper.appendChild(containerToWrap);
Clean up residual text nodes (like line breaks) to prevent unwanted spacing in the layout
let nextNode = wrapper.nextSibling;
if(nextNode && nextNode.nodeType === 3) nextNode.remove();
}
}
Finally, move the fully formatted token element into our custom green grid
grid.appendChild(el);
} catch (err) {
If a specific token is malformed by SAP, log the error but allow the loop to continue formatting the rest of the tokens
console.error(“Erro ao processar o token:”, err);
}
});
8.FINAL CLEANUP
Remove the raw text strings from the bottom of the job description that were used as data fallbacks
if (descDiv) {
let descHtml = descDiv.innerHTML;
descHtml = descHtml.replace(/Employee Group:[\s\S]*?(?=
Apply now
/* ==========================================================================
BUTTON STANDARDIZATION (CSS)
This section changes how buttons look on the page. It removes the default
styles provided by the browser or the SAP SuccessFactors system, and
applies a uniform, custom design (flat red background, white text, etc.).
========================================================================== */
/* Target specific buttons on the page using their CSS classes /
.unify-button-container .btn-large,
.unify-button-container .unify-apply-now,
.unify-button-container button.employee-refer-a-friend {
display: inline-block !important; / Forces the button to respect width/height margins /
padding: 10px 20px !important; / Adds space inside the button (top/bottom, left/right) /
font-size: 16px !important; / Sets the text size /
text-align: center !important; / Centers the text inside the button /
text-decoration: none !important; / Removes underlines from links /
border-radius: 4px !important; / Rounds the corners of the button slightly /
background-color: #ed0715 !important; / Sets the button background to a specific red /
border: 2px solid #ed0715 !important; / Adds a red border matching the background /
color: #ffffff !important; / Sets the text color to white /
transition: none !important; / Disables default fading animations /
cursor: pointer !important; / Changes the mouse cursor to a pointing hand on hover /
line-height: normal !important; / Resets the line height to default /
height: auto !important; / Allows the button to grow if text is large /
min-width: 150px !important; / Ensures the button is never too narrow /
background-image: none !important;/ Removes any default gradient colors /
box-shadow: none !important; / Removes default shadow effects /
text-shadow: none !important; / Removes shadows behind the text */
}
/* HOVER STATE: How the button looks when the user puts the mouse over it /
.unify-button-container .btn-large:hover,
.unify-button-container .unify-apply-now:hover,
.unify-button-container button.employee-refer-a-friend:hover {
background-color: #ed0715 !important; / Keeps the background red /
color: #ffffff !important; / Keeps the text white /
border: 2px solid #ed0715 !important; / Keeps the border red /
box-shadow: none !important; / Ensures no shadow appears */
}
/* ACTIVE/FOCUS STATE: How the button looks when clicked or selected via keyboard /
.unify-button-container a:active,
.unify-button-container button:active,
.unify-button-container a:focus,
.unify-button-container button:focus {
background-color: #ed0715 !important;
color: #ffffff !important;
outline: none !important; / Removes the default blue outline around focused elements /
box-shadow: none !important;
filter: none !important; / Removes any darkening effects applied by default */
}
/* Centers the button container if it was previously aligned to the right */
.unify .unify-button-container.rightAlign, .unify .social-media-container.rightAlign {
justify-content: center !important;
}
/* Ensures the apply button is fully visible (not faded out) */
.unify-apply-now {
opacity: 1 !important;
}
/* ==========================================================================
CUSTOM BRAND TEXT STYLING
This applies the specific font and alignment required by the client to
the brand descriptions we will inject via JavaScript.
========================================================================== /
.custom-brand-display-text p {
font-family: custom2abfb6e0ee794a99894a6 !important; / Custom font family /
font-size: 14px !important; / Specific font size /
color: rgb(48,48,48) !important; / Dark gray text color /
line-height: 1.42857143 !important; / Spacing between lines of text /
text-align: justify !important; / Aligns text to the left /
margin: 10px 25px !important; / Adds spacing below paragraphs */
}
(function() {
/* ==========================================================================
SCRIPT 1: BRAND RENDERER
This script acts like a search-and-replace tool. It looks for the word
“Brand:” on the page, checks which brand is written next to it, and
creates a beautiful visual block (image + formatted text) to show instead.
========================================================================== */
/
•THE DATABASE (brandContent object)
•Think of this as a dictionary. For every brand name, we store the image
•link and the description text. We also separate them by language (locale).
•/
const brandContent = {
‘leanheat’ is the “clean” version of the brand name
“leanheat”: {
‘en_GB’ is the language code for English
“en_GB”: {
image: “https:rmkcdn.successfactors.com/ef55fddb/f091c610-46ac-4212-99b0-0.gif”,
description: “Danfoss Leanheat Building’s AI based IoT solution monitors, controls and optimizes the indoor temperature and humidity of buildings heated using district heating. Our solution improves the energy efficiency of properties, increases the operational efficiency of district heating companies and creates a healthier indoor climate for residents. At Danfoss, we believe that energy-efficiency holds the answers to the challenges and opportunities posed by the world today. We encourage all our people to be digitally driven and do the extraordinary so that they question the accepted truths, dare to be bold, and take charge.”
}
},
“geminatermix”: {
“da_DK”: {
image: “https:rmkcdn.successfactors.com/ef55fddb/b402b0f8-fd9a-4cd0-9d09-6.jpg”,
description: “Gemina Termix A/S, der er en del af Danfoss-koncernen, ligger i Sunds ved Herning. Virksomheden er specialiseret indenfor udvikling, produktion og salg af fjernvarmeanlæg til huse og lejligheder samt større byggerier. Gennem en høj grad af innovation har Gemina Termix A/S sikret sig en ledende position indenfor fjernvarmebranchen.”
}
},
“postgraduate”: {
“en_GB”: {
image: “https:rmkcdn.successfactors.com/ef55fddb/035c445e-bf8c-4b96-9d52-5.jpg”,
description: “Danfoss engineers solutions that increase machine productivity, reduce emissions, lower energy consumption, and enable electrification. Our solutions are used in such areas as refrigeration, air conditioning, heating, power conversion, motor control, industrial machinery, automotive, marine, and off- and on-highway equipment. Our innovative engineering dates back to 1933. Danfoss is family-owned, employing more than 39.000 people, serving customers in more than 100 countries through a global footprint of 95 factories.”
}
},
“semikrondanfoss”: {
“en_GB”: { image: “https:rmkcdn.successfactors.com/ef55fddb/b31e89f5-70d0-4683-8bea-b.jpg”, description: “Semikron Danfoss is a global technology leader in power electronics. Our product offerings include semiconductor devices, power modules, stacks and systems. In a world that is going electric, Semikron Danfoss technologies are more relevant than ever. We take care of our employees and create value for our customers by investing significantly in innovation, technology, capacity and service to deliver best-in-industry performance and for a sustainable future.” },
“de_DE”: { image: “https:rmkcdn.successfactors.com/ef55fddb/b31e89f5-70d0-4683-8bea-b.jpg”, description: “Semikron Danfoss ist ein weltweiter Technologieführer in der Leistungselektronik. Unser Produktangebot umfasst Halbleiterbauelemente, Leistungsmodule, Stacks und Systeme. In einer zunehmend elektrifizierten Welt sind die Technologien von Semikron Danfoss wichtiger denn je. Wir kümmern uns um unsere Mitarbeitenden und schaffen Wert für unsere Kunden, indem wir erheblich in Innovation, Technologie, Kapazität und Service investieren.” },
“fr_FR”: { image: “https:rmkcdn.successfactors.com/ef55fddb/b31e89f5-70d0-4683-8bea-b.jpg”, description: “Semikron Danfoss est un leader technologique mondial dans le domaine de l’électronique de puissance. Notre offre de produits comprend des semi-conducteurs, modules de puissance, des convertisseurs de puissance et des systèmes. Dans un monde qui devient électrique, les technologies de Semikron Danfoss sont plus pertinentes que jamais.” },
“sk_SK”: { image: “https:rmkcdn.successfactors.com/ef55fddb/b31e89f5-70d0-4683-8bea-b.jpg”, description: “Semikron Danfoss je globálnym lídrom v technológiach, konkrétne v oblasti výkonovej elektroniky. Naše portfólio produktov zahŕňa polovodičové zariadenia, výkonové moduly, zásobníky a systémy. Vo svete, kde elektrifikácia zohráva čím ďalej väčšiu rolu, sú technológie Semikron Danfoss dôležitejšie ako kedykoľvek predtým.” }
},
“danfossredan”: {
“en_GB”: { image: “https:rmkcdn.successfactors.com/ef55fddb/039ebf31-0f83-473e-b002-f.png”, description: “Danfoss Redan has since 1971 been a leading producer of modern district heating units, heat exchangers and controls for district heating - both for private homes and for larger district-heating installations. The constant focus on efficiency and quality has made the Danfoss Redan name known far beyond the country’s borders.” },
“dk_DK”: { image: “https:rmkcdn.successfactors.com/ef55fddb/039ebf31-0f83-473e-b002-f.png”, description: “Danfoss Redan har siden 1971 været førende inden for produktion af moderne fjernvarmeunits, varmevekslere og automatik til fjernvarme - både til private hjem og til større fjernvarmeinstallationer. Det konstante fokus på effektivitet og kvalitet har gjort Danfoss Redan navnet kendt langt uden for landets grænser.” }
},
“standard”: {
“en_GB”: { image: “https:rmkcdn.successfactors.com/ef55fddb/7571acdc-3a84-48b1-bac6-4.jpg”, description: “Danfoss engineers solutions that increase machine productivity, reduce emissions, lower energy consumption, and enable electrification. Our solutions are used in areas such as refrigeration, air conditioning, heating, power conversion, motor control, industrial machinery, marine, and on- and off-highway equipment. We also provide solutions for data centers, renewable energy, energy storage, heat recovery, as well as contribute to district energy solutions for cities.Our innovative engineering dates back to 1933. Danfoss is family-owned and employs over 39,000 people. We create long-term value for our customers in more than 100 countries with a global footprint of around 100 factories.”},
“de_DE”: { image: “https:rmkcdn.successfactors.com/ef55fddb/7571acdc-3a84-48b1-bac6-4.jpg”, description: “Danfoss entwickelt Lösungen, die die Produktivität von Maschinen steigern, Emissionen reduzieren, den Energieverbrauch senken und Elektrifizierung ermöglichen. Unsere Lösungen kommen in Bereichen wie Kälte- und Klimatechnik, Heizung, Energieumwandlung, Motorsteuerung, Industriemaschinen, Schifffahrt sowie in On- und Off-Highway-Anwendungen zum Einsatz. Darüber hinaus bieten wir Lösungen für Rechenzentren, erneuerbare Energien, Energiespeicherung und Wärmerückgewinnung und tragen zu Fernenergielösungen für Städte bei. Unsere innovative Ingenieurskunst reicht bis ins Jahr 1933 zurück. Danfoss ist ein familiengeführtes Unternehmen mit über 39.000 Mitarbeitenden. Wir schaffen langfristigen Mehrwert für unsere Kunden in mehr als 100 Ländern - mit rund 100 Produktionsstätten weltweit.” },
“sk_SK”: { image: “https:rmkcdn.successfactors.com/ef55fddb/7571acdc-3a84-48b1-bac6-4.jpg”, description: “Danfoss vyvíja riešenia, ktoré zvyšujú produktivitu strojov, znižujú emisie, znižujú spotrebu energie a umožňujú elektrifikáciu. Naše riešenia sa používajú v oblastiach ako chladenie, klimatizácia, vykurovanie, konverzia energie, riadenie motorov, priemyselné stroje, námorný sektor a cestná aj mimocestná technika. Poskytujeme tiež riešenia pre dátové centrá, obnoviteľné zdroje energie, ukladanie energie, rekuperáciu tepla a prispievame k riešeniam centralizovaného zásobovania energiou pre mestá. Naša inovatívna technická tradícia siaha až do roku 1933. Danfoss je rodinná spoločnosť s viac ako 39 000 zamestnancami. Vytvárame dlhodobú hodnotu pre našich zákazníkov vo viac ako 100 krajinách a máme približne 100 výrobných závodov po celom svete.” },
“pl_PL”: { image: “https:rmkcdn.successfactors.com/ef55fddb/7571acdc-3a84-48b1-bac6-4.jpg”, description: “Danfoss opracowuje rozwiązania, które zwiększają wydajność maszyn, redukują emisje, obniżają zużycie energii oraz umożliwiają elektryfikację. Nasze rozwiązania są wykorzystywane w takich obszarach jak chłodnictwo, klimatyzacja, ogrzewanie, przetwarzanie energii, sterowanie silnikami, maszyny przemysłowe, sektor morski oraz pojazdy drogowe i pozadrogowe. Oferujemy również rozwiązania dla centrów danych, energii odnawialnej, magazynowania energii i odzysku ciepła oraz wspieramy miejskie systemy ciepłownicze. Nasza innowacyjna działalność inżynieryjna sięga 1933 roku. Danfoss jest firmą rodzinną i zatrudnia ponad 39 000 pracowników. Tworzymy długoterminową wartość dla naszych klientów w ponad 100 krajach, posiadając około 100 zakładów produkcyjnych na całym świecie.” },
“da_DK”: { image: “https:rmkcdn.successfactors.com/ef55fddb/7571acdc-3a84-48b1-bac6-4.jpg”, description: “Danfoss udvikler løsninger, der øger maskinernes produktivitet, reducerer emissioner, sænker energiforbruget og muliggør elektrificering. Vores løsninger anvendes inden for områder som køling, aircondition, opvarmning, energikonvertering, motorstyring, industrimaskiner, marine samt on- og off-highway udstyr. Vi leverer også løsninger til datacentre, vedvarende energi, energilagring og varmegenvinding samt bidrager til fjernvarmeløsninger til byer. Vores innovative ingeniørarbejde går tilbage til 1933. Danfoss er familieejet og beskæftiger mere end 39.000 medarbejdere. Vi skaber langsigtet værdi for vores kunder i mere end 100 lande med et globalt fodaftryk på omkring 100 fabrikker.” },
“es_MX”: { image: “https:rmkcdn.successfactors.com/ef55fddb/7571acdc-3a84-48b1-bac6-4.jpg”, description: “Danfoss desarrolla soluciones que aumentan la productividad de las máquinas, reducen emisiones, disminuyen el consumo de energía y permiten la electrificación. Nuestras soluciones se utilizan en áreas como refrigeración, aire acondicionado, calefacción, conversión de energía, control de motores, maquinaria industrial, sector marino y equipos dentro y fuera de carretera. También ofrecemos soluciones para centros de datos, energías renovables, almacenamiento de energía y recuperación de calor, y contribuimos a soluciones energéticas urbanas. Nuestra ingeniería innovadora se remonta a 1933. Danfoss es una empresa familiar con más de 39,000 empleados. Creamos valor a largo plazo para nuestros clientes en más de 100 países, con una presencia global de alrededor de 100 plantas de producción.” },
“zh_CN”: { image: “https:rmkcdn.successfactors.com/ef55fddb/7571acdc-3a84-48b1-bac6-4.jpg”, description: “丹佛斯致力于开发解决方案,以提高设备生产力、减少排放、降低能源消耗并推动电气化发展。 我们的解决方案广泛应用于制冷、空调、供热、电力转换、电机控制、工业机械、船舶以及道路和非道路设备等领域。同时,我们还为数据中心、可再生能源、能源存储和余热回收提供解决方案,并助力城市区域能源系统的发展。 我们的创新工程可追溯至1933年。丹佛斯是一家家族企业,拥有超过39,000名员工。我们在100多个国家为客户创造长期价值,并在全球拥有约100家工厂。” },
“fr_FR”: { image: “https:rmkcdn.successfactors.com/ef55fddb/7571acdc-3a84-48b1-bac6-4.jpg”, description: “Danfoss développe des solutions qui augmentent la productivité des machines, réduisent les émissions, diminuent la consommation d’énergie et permettent l’électrification. Nos solutions sont utilisées dans des domaines tels que la réfrigération, la climatisation, le chauffage, la conversion d’énergie, le contrôle des moteurs, les machines industrielles, le secteur maritime ainsi que les équipements routiers et tout-terrain. Nous fournissons également des solutions pour les centres de données, les énergies renouvelables, le stockage d’énergie et la récupération de chaleur, et nous contribuons aux solutions énergétiques urbaines. Notre ingénierie innovante remonte à 1933. Danfoss est une entreprise familiale qui emploie plus de 39 000 personnes. Nous créons de la valeur à long terme pour nos clients dans plus de 100 pays, avec une présence mondiale d’environ 100 sites de production.” }
}
};
/
•HELPER FUNCTION: String Purifier
•When someone types “LeanHeat!” or " Lean Heat ", this function removes
•spaces, punctuation, and makes it lowercase (“leanheat”).
•This makes sure we always match the brand in our database correctly.
•/
function purify(str) {
return str.toLowerCase().replace(/[^a-z0-9]/g, ‘’);
}
/
•MAIN LOGIC: Render Brand Content
•This function looks at the page, finds the brand name, and draws the image.
•/
function renderBrandContent() {
Step 1: Grab every single element currently visible on the page
var elements = document.querySelectorAll(’*’);
Default brand is “standard” in case we don’t find anything
var detectedKey = “standard”;
Step 2: Loop through all elements to find the label “Brand:”
for (var i = 0; i < elements.length; i++) {
Check if the text inside the element is exactly “Brand:”
if (elements[i].textContent && elements[i].textContent.trim() === “Brand:”) {
If found, the actual brand name is usually in the very next element
var rawValue = elements[i].nextElementSibling ? elements[i].nextElementSibling.textContent : “standard”;
Clean up the text (e.g., “Lean Heat” ->“leanheat”)
var cleanValue = purify(rawValue);
If this clean name exists in our database above, save it as the detected brand
if (brandContent[cleanValue]) {
detectedKey = cleanValue;
}
Stop searching since we found what we needed
break;
}
}
Step 3: Find out what language the user is viewing the page in (e.g., “en-US” becomes “en_US”)
var lang = document.documentElement.lang.replace(’-’, ‘_’) || ‘en_GB’;
Step 4: Get the specific image and text for the detected Brand AND Language
Fallbacks: If language doesn’t exist, use English. If brand doesn’t exist, use standard English.
var data = brandContent[detectedKey][lang] || brandContent[detectedKey][‘en_GB’] || brandContent[‘standard’][‘en_GB’];
Step 5: Check if we haven’t already drawn our custom block. If not, draw it!
if (!document.querySelector(’.custom-brand-display’)) {
This is the HTML code we will inject into the page
It uses the classes we styled in the section above
var contentToInject = `
${data.description}
`;
Find the “Apply Now” button container…
var applyContainer = document.querySelector(’.applylink.unify-button-container’);
…and paste our new HTML block right below it
if (applyContainer) applyContainer.insertAdjacentHTML(‘afterend’, contentToInject);
}
}
/
•DYNAMIC LISTENER (MutationObserver)
•Web pages today often load information slowly or change dynamically without reloading.
•This “Observer” watches the page continuously. If anything changes, it runs our
•function again to ensure the image appears even if the page loads slowly.
•/
var observer = new MutationObserver(renderBrandContent);
Tell the observer to watch the whole body for any added or removed elements
observer.observe(document.body, { childList: true, subtree: true });
Also run it once immediately just in case the page is already fully loaded
renderBrandContent();
})();
(function() {
/* ==========================================================================
SCRIPT 2: CLEANUP SCRIPT (Element Hider)
Since Script 1 added a beautiful new image and description, we don’t want
the user to still see the raw, ugly text that says “Brand: LeanHeat” on
the page. This script finds that old text and makes it invisible.
========================================================================== */
function hideBrandElement() {
Find all text-bearing elements on the page
var allLabels = document.querySelectorAll(’.joblayouttoken-label, span, div, p, label’);
Check each element one by one
allLabels.forEach(function(el) {
If the element says exactly “Brand:”
if (el.textContent && el.textContent.trim() === “Brand:”) {
Hide the word “Brand:”
el.style.display = ‘none’;
Hide the value next to it (e.g., the word “LeanHeat”)
if (el.nextElementSibling) {
el.nextElementSibling.style.display = ‘none’;
}
If they are sitting inside a small container box by themselves, hide the box too
if (el.parentElement && el.parentElement.children.length