Add crossorigin param

master
Will Faught 3 years ago
parent 5538e55bb0
commit 49204189f2

@ -1,6 +1,7 @@
{{ $crossorigin := .crossorigin | default "anonymous" }}
{{ $href := .href }}
{{ $integrity := .integrity }}
{{ $onload := .onload | safeJS }}
{{ $src := .src }}
<script {{ if ne $href (urls.Parse $href).Path }} crossorigin="anonymous" {{ end }} defer integrity="{{ $integrity }}" {{ with $onload }} onload="{{ . }}" {{ end }} referrerpolicy="no-referrer" src="{{ partial `paige/func-url.html` $src }}"></script>
<script {{ if ne $href (urls.Parse $href).Path }} {{ with $crossorigin }} crossorigin="{{ $anonymous }}" {{ end }} defer integrity="{{ $integrity }}" {{ with $onload }} onload="{{ . }}" {{ end }} referrerpolicy="no-referrer" src="{{ partial `paige/func-url.html` $src }}"></script>

Loading…
Cancel
Save