generated from adobe/aem-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TDW-1646 move admiral to dependencies
- Loading branch information
Bonnie Zheng
committed
Apr 15, 2024
1 parent
23d6d8b
commit 6ac3f0c
Showing
3 changed files
with
30 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* Loads Admiral script | ||
*/ | ||
async function loadAdmiral() { | ||
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); | ||
} | ||
} | ||
|
||
loadAdmiral(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters