Skip to content

Commit

Permalink
TDW-1646 admiral script
Browse files Browse the repository at this point in the history
  • Loading branch information
Bonnie Zheng committed Apr 10, 2024
1 parent 727be17 commit 064c152
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions scripts/delayed.js
Original file line number Diff line number Diff line change
Expand Up @@ -755,3 +755,29 @@ const hasWeFevo = document.querySelector('a.we-fevo-btn');
if (hasWeFevo) {
injectWeFevoScript();
}


/**
* 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';
script.async = true;
document.head.appendChild(script);
} catch (error) {
throw new Error('Error loading Admiral script: ', error);
}
};
fetchScript();
}

loadAdmiral();

0 comments on commit 064c152

Please sign in to comment.