Skip to content

Commit

Permalink
Remove temp fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
petesfrench committed Jul 18, 2023
1 parent 85abbe7 commit 5acaf77
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions static/js/src/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,47 +420,3 @@ if (accountContainer) {
);
});
}

// TEMP FIX - DE 06.07.23
// UPDATES LXD LINK TARGET IN THE MEGANAV UNTIL
// WE MERGE THE NEW MEGANAV
function replaceLxdLink() {
const globalNav = document.querySelector("#canonical-global-nav");
const lxdNavLinks = globalNav.querySelectorAll(
'[href="https://linuxcontainers.org/"]'
);
lxdNavLinks.forEach(function (element) {
element.href = "/lxd";
});
}
replaceLxdLink();

// TEMP FIX - PETE F 15.05.23
// UPDATES 'UBUNTU ADVANTAGE' TO 'UBUNTU PRO' IN THE MEGANAV UNTIL
// WE MERGE THE NEW MEGANAV
function replaceUbuntuAdvantage() {
const globalNav = document.querySelector("#canonical-global-nav");
const targetElementsArray = globalNav.querySelectorAll(
"[href='https://ubuntu.com/support']"
);
targetElementsArray.forEach(function (element) {
if (element.children.length) {
element.querySelector("h4").innerText = "Ubuntu Pro ›";
} else {
element.innerText = "Ubuntu Pro";
}
});
}
replaceUbuntuAdvantage();

// TEMP FIX - MPT 03.07.23
// REPLACES CANONICAL LOGO WITH CANONICAL LINK UNTIL
// WE MERGE THE NEW MEGANAV
function replaceGlobalNavLogo() {
const globalNavLogo = document.querySelector(".global-nav__header-logo");
if (globalNavLogo) {
globalNavLogo.innerHTML = `<a href="https://canonical.com/" class="global-nav__header-link-anchor" style="color:white; padding-left: 0">Canonical</a>`;
}
}

replaceGlobalNavLogo();

0 comments on commit 5acaf77

Please sign in to comment.