Skip to content

Commit

Permalink
TDW-1646 Add Admiral Script (#122)
Browse files Browse the repository at this point in the history
* add admiral script

* TDW-1646 admiral script

* remove in script.js

---------

Co-authored-by: Bonnie Zheng <[email protected]>
  • Loading branch information
13onnie and Bonnie Zheng authored Apr 15, 2024
1 parent 757729b commit 23d6d8b
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 23d6d8b

Please sign in to comment.