Add tag to deployment pages (#3624)

This commit is contained in:
Jeremiah Lowin 2026-03-25 11:39:25 -04:00 committed by GitHub
commit 6c76bea3e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,10 +1,16 @@
// Load Unify intent tag on authentication pages only // Load Unify intent tag on selected pages
(function () { (function () {
if (typeof window === "undefined") return; if (typeof window === "undefined") return;
function isAuthPage() { function isTaggedPage() {
var path = window.location.pathname; var path = window.location.pathname;
return path.includes("/servers/auth/") || path.includes("/clients/auth/"); return (
path.includes("/servers/auth/") ||
path.includes("/clients/auth/") ||
path.includes("/deployment/running-server") ||
path.includes("/deployment/http") ||
path.includes("/deployment/prefect-horizon")
);
} }
function loadUnify() { function loadUnify() {
@ -45,9 +51,9 @@
} }
function update() { function update() {
if (isAuthPage() && !document.getElementById("unifytag")) { if (isTaggedPage() && !document.getElementById("unifytag")) {
loadUnify(); loadUnify();
} else if (!isAuthPage() && document.getElementById("unifytag")) { } else if (!isTaggedPage() && document.getElementById("unifytag")) {
document.getElementById("unifytag").remove(); document.getElementById("unifytag").remove();
} }
} }