From a787a624ba03b9f2936bd5d668ff9510b5f34ef3 Mon Sep 17 00:00:00 2001 From: Bonnie Zheng Date: Wed, 10 Apr 2024 16:14:41 -0700 Subject: [PATCH] remove in script.js --- scripts/delayed.js | 2 -- scripts/scripts.js | 23 ----------------------- 2 files changed, 25 deletions(-) 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;