-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Release] Stage to Main #241
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
6a46c95
prefetch test
JasonHowellSlavin 8c1629f
Added everything prefectch besides scripts/scripts, need to see how i…
JasonHowellSlavin dd0c6b5
test
JasonHowellSlavin fbed148
Adding crossorigin
JasonHowellSlavin 8bb100e
Some cleanup, additional tests
JasonHowellSlavin 48fd423
Testing postbody
JasonHowellSlavin 4b4e70c
Adding the ability to have a group param added to the sandbox POST re…
JasonHowellSlavin 014b4dd
Removing file not needed
JasonHowellSlavin 5aff88a
Testing for CR
JasonHowellSlavin 60ce029
Testing
JasonHowellSlavin a4fd40a
Again
JasonHowellSlavin 74c9a11
working as expected
JasonHowellSlavin 0bde7a2
Merge pull request #240 from adobecom/head-prefetch-test
JasonHowellSlavin 229705f
Merge pull request #239 from adobecom/add-param-anaylitics-sandbox
JasonHowellSlavin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,32 @@ | ||
<meta name="viewport" content="width=device-width, initial-scale=1"/> | ||
<link rel="preload" href="/styles/styles.css" as="style"/> | ||
<script> | ||
const libs = (() => { | ||
const { hostname, search } = window.location; | ||
if (!['.hlx.', '.stage.', 'local'].some((i) => hostname.includes(i))) return '/libs'; | ||
const branch = new URLSearchParams(search).get('milolibs') || 'main'; | ||
if (branch === 'local') return 'http://localhost:6456/libs'; | ||
return branch.includes('--') ? `https://${branch}.hlx.live/libs` : `https://${branch}--milo--adobecom.hlx.live/libs`; | ||
})(); | ||
|
||
const miloStyles = document.createElement('link'); | ||
const miloUtils = document.createElement('link'); | ||
const miloDecorate = document.createElement('link'); | ||
|
||
miloStyles.setAttribute('as', 'style'); | ||
miloStyles.setAttribute('href', `${libs}/styles/styles.css`); | ||
|
||
[miloUtils, miloDecorate].forEach((tag) => { | ||
tag.setAttribute('crossorigin', 'true'); | ||
tag.setAttribute('as', 'script'); | ||
}) | ||
|
||
miloUtils.setAttribute('href', `${libs}/utils/utils.js`); | ||
Check warning Code scanning / CodeQL Client-side URL redirect Medium
Untrusted URL redirection depends on a
user-provided value Error loading related location Loading |
||
miloDecorate.setAttribute('href', `${libs}/utils/decorate.js`); | ||
Check warning Code scanning / CodeQL Client-side URL redirect Medium
Untrusted URL redirection depends on a
user-provided value Error loading related location Loading |
||
|
||
[miloStyles, miloUtils, miloDecorate].forEach((tag) => tag.setAttribute('rel', 'preload')); | ||
document.head.append(miloStyles, miloUtils, miloDecorate); | ||
</script> | ||
<script src="/scripts/scripts.js" type="module"></script> | ||
<style>body { display: none; }</style> | ||
<link rel="icon" href="data:,"> |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / CodeQL
Client-side URL redirect Medium