Before the new portal experience I was able to use code listed below to make a menu item just a hyperlink to an outside url. That stopped working and I had to put that into a page witht eh hyperlink so I now have to click on it twice. now that things have settled down is there a way to just make a menu item on the navigation bar a hyper link that can go direclty to an ootuside URL
Code I was using:
(() => { // IMPORTANT Edit this to the URL you want the button to redirect to const TARGET_URL = "https://example.com"; // CSS selector const SIDEBAR_SELECTOR = "body"; // leave as body if unsure // IMPORTANT Text label of the button you want to change (case-sensitive exact match after trimming) const BUTTON_LABEL = "hyperlink"; // Handler: find matching button(s) and attach a click handler that redirects function attachRedirectHandlers(root = document) { const buttons = Array.from(root.querySelectorAll("button")); buttons.forEach((btn) => { // skip buttons already processed if (btn.dataset.redirectAttached === "1") return; const label = (btn.textContent || "").trim(); if (label === BUTTON_LABEL) { // capture the click early, stop other handlers, and redirect btn.addEventListener( "click", (e) => { e.preventDefault(); e.stopImmediatePropagation(); // Optional: small delay so any UI effects complete, remove if you want immediate redirect window.location.href = TARGET_URL; }, { capture: true } ); // mark processed so we don't attach twice btn.dataset.redirectAttached = "1"; // optionally change cursor to indicate a link btn.style.cursor = "pointer"; } }); } // Run once in case the element already exists attachRedirectHandlers(document);