From 2b200f8704472d9934cdb10c4c2cf68dbd7c80d5 Mon Sep 17 00:00:00 2001 From: Alex Fornuto Date: Thu, 5 Aug 2021 19:08:43 -0500 Subject: [PATCH] Hack the logo to point to the marketing site (#2441) --- docs/.vuepress/config.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index f73fbad53..867c53ba5 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -229,4 +229,31 @@ module.exports = { ], }, }, + head: [ + //Hack: Make clicking on the logo go to home url + ["script", + {}, + ` + const logoUrlChanger = setInterval(function() { + //Anchor above the logo image + const homeEls = document.getElementsByClassName("home-link"); + if(homeEls.length > 0) { + const homeEl = homeEls[0]; + homeEl.setAttribute("href", "https://www.pomerium.com"); + homeEl.setAttribute("onclick", "document.location='https://www.pomerium.com';return false;"); + clearInterval(logoUrlChanger); + } + + //Actual logo image + const logoEls = document.getElementsByClassName("logo") + if(logoEls.length > 0) { + const logoEl = logoEls[0] + logoEl.setAttribute("onclick", "document.location='https://www.pomerium.com';return false;"); + clearInterval(logoUrlChanger); + } + }, 1000) + + ` + ] + ], };