diff --git a/scripts/delayed.js b/scripts/delayed.js index 72babe8e..b724abbd 100644 --- a/scripts/delayed.js +++ b/scripts/delayed.js @@ -756,7 +756,6 @@ if (hasWeFevo) { injectWeFevoScript(); } - /** * Loads Admiral script */ @@ -771,7 +770,6 @@ function loadAdmiral() { script.type = 'text/javascript'; script.innerHTML = content; script.id = 'admiral'; - script.async = true; document.head.appendChild(script); } catch (error) { throw new Error('Error loading Admiral script: ', error); diff --git a/scripts/scripts.js b/scripts/scripts.js index afbd6948..0d58e1de 100644 --- a/scripts/scripts.js +++ b/scripts/scripts.js @@ -1052,35 +1052,12 @@ async function loadEager(doc) { } } -/** - * Loads Admiral script - */ -function loadAdmiral() { - const fetchScript = async () => { - try { - const response = await fetch( - "https://orchestrator-config-uat.pgatour.com/revops/admirial" - ); - const content = await response.text(); - const script = document.createElement("script"); - script.type = "text/javascript"; - script.innerHTML = content; - script.id = "admiral"; - document.head.appendChild(script); - } catch (error) { - console.error("Error loading Admiral script: ", error); - } - }; - fetchScript(); -} - /** * loads everything that doesn't need to be delayed. */ async function loadLazy(doc) { const main = doc.querySelector('main'); await loadBlocks(main); - loadAdmiral() const { hash } = window.location; const element = hash ? main.querySelector(hash) : false;