-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔥 Update Fairground network to not be an open proxy (#39544)
* Update Fairground network to not be an open proxy * Fix linter issues * 📦 Update github/codeql-action action to v2.22.2 (#39545) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
- Loading branch information
1 parent
ce285ca
commit 417fc42
Showing
3 changed files
with
17 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,20 @@ | ||
import {loadScript, validateData} from '#3p/3p'; | ||
import {validateData} from '#3p/3p'; | ||
|
||
/** | ||
* @param {!Window} global | ||
* @param {!Object} data | ||
*/ | ||
export function fairground(global, data) { | ||
validateData(data, ['src']); | ||
loadScript(global, data['src']); | ||
validateData(data, ['project', 'hash']); | ||
|
||
const c = document.createElement('script'); | ||
c.src = | ||
'https://amp.thefairground.com/' + | ||
data.project + | ||
'/' + | ||
data.hash + | ||
'/amp.script.js'; | ||
c.type = 'text/javascript'; | ||
|
||
global.document.getElementsByTagName('body')[0].append(c); | ||
} |
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