Skip to content

Commit

Permalink
Scripts tweak to cleanup whitespace etc (google#1262)
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin authored and dseynaev committed Jan 30, 2023
1 parent 820f7c9 commit ccdecf7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions layouts/partials/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,13 @@
{{ if .Site.Params.prism_syntax_highlighting -}}
<script src='{{ "js/prism.js" | relURL }}'></script>
{{ else -}}
{{ $c2cJS := resources.Get "js/click-to-copy.js" | minify | fingerprint }}
<script defer src="{{ $c2cJS.RelPermalink }}" integrity="{{ $c2cJS.Data.Integrity }}" crossorigin="anonymous"></script>
{{ $c2cJS := resources.Get "js/click-to-copy.js" -}}
{{ if hugo.IsProduction -}}
{{ $c2cJS = $c2cJS | minify | fingerprint -}}
{{ end -}}
<script defer src="{{ $c2cJS.RelPermalink }}" {{ with $c2cJS.Data.Integrity -}}
integrity="{{ . }}" {{ end -}}
crossorigin="anonymous"></script>
{{ end -}}

<script src='{{ "js/tabpane-persist.js" | relURL }}'></script>
Expand Down

0 comments on commit ccdecf7

Please sign in to comment.