Skip to content

Commit

Permalink
Merge pull request hlxsites#1345 from hlxsites/1344-fix-for-shopleica
Browse files Browse the repository at this point in the history
1344-fix-for-shopleica
  • Loading branch information
davenichols-DHLS authored Jan 7, 2025
2 parents 30ac40c + 0b595bb commit 2be8274
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion scripts/scripts-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ function loadMobileMenu() {
const mobileMunu = document.createElement('mobilemenu');
const url = new URL(window.location.href);
if (url.pathname.match(/\/us\/en\/products\/(family\/|sku\/|bundles\/)/)
|| url.pathname.match(/\/us\/en\/solutions\//)) {
|| url.pathname.match(/\/us\/en\/solutions\//)) {
breadcrumb.after(mobileMunu);
}
}
Expand Down Expand Up @@ -1100,4 +1100,16 @@ window.dataLayer.push({
});
// Datalayer Init - End

// TEMP FIX FOR SHOP LECIA LINKS
document.addEventListener('DOMContentLoaded', () => {
const oldUrl = 'https://shop.leica-microsystems.com/content/danaher/ls/us/en';
const newUrl = 'https://lifesciences.danaher.com/us/en';
const links = document.querySelectorAll('a');
links.forEach((link) => {
if (link.href.includes(oldUrl)) {
link.href = link.href.replace(oldUrl, newUrl);
}
});
});

loadPage();
Loading

0 comments on commit 2be8274

Please sign in to comment.