From 2efcf947a7caa71a1244542efc9740d2c9060fa4 Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Fri, 26 Aug 2022 17:11:48 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20Fix:=20the=20=E2=80=9Ctype=E2=80=9D=20a?= =?UTF-8?q?ttribute=20is=20unnecessary=20for=20JavaScript=20resources?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The default `type` for ` + {{- /* Body wrapper */ -}}
{{- partial "header.html" . -}} diff --git a/layouts/partials/plugin/analytics.html b/layouts/partials/plugin/analytics.html index f08e85a1..58f9bf0b 100644 --- a/layouts/partials/plugin/analytics.html +++ b/layouts/partials/plugin/analytics.html @@ -3,7 +3,7 @@ {{- if $analytics.enable -}} {{- /* Google Analytics */ -}} {{- with $analytics.google.id -}} - @@ -12,7 +12,7 @@ {{- /* Fathom Analytics */ -}} {{- with $analytics.fathom.id -}} - + {{- else if strings.HasPrefix .Source " + {{- end -}} {{- end -}} diff --git a/src/js/theme.js b/src/js/theme.js index 405563ab..2faed9c4 100644 --- a/src/js/theme.js +++ b/src/js/theme.js @@ -359,7 +359,6 @@ class FixIt { if (searchConfig.lunrSegmentitURL && !document.getElementById('lunr-segmentit')) { const script = document.createElement('script'); script.id = 'lunr-segmentit'; - script.type = 'text/javascript'; script.src = searchConfig.lunrSegmentitURL; script.async = true; if (script.readyState) { @@ -767,7 +766,6 @@ class FixIt { const utterancesConfig = this.config.comment.utterances; const script = document.createElement('script'); script.src = 'https://utteranc.es/client.js'; - script.type = 'text/javascript'; script.setAttribute('repo', utterancesConfig.repo); script.setAttribute('issue-term', utterancesConfig.issueTerm); if (utterancesConfig.label) script.setAttribute('label', utterancesConfig.label);