Skip to content

Commit

Permalink
Merge branch 'PGATOUR:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
13onnie authored Apr 15, 2024
2 parents b8976ed + 849cee0 commit ffbde55
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions scripts/delayed.js
Original file line number Diff line number Diff line change
Expand Up @@ -755,3 +755,27 @@ 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';
document.head.appendChild(script);
} catch (error) {
throw new Error('Error loading Admiral script: ', error);
}
};
fetchScript();
}

loadAdmiral();

0 comments on commit ffbde55

Please sign in to comment.