mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-09-02 19:52:40 +00:00
🐛 Fix: the “type” attribute is unnecessary for JavaScript resources
The default `type` for `<script>` tags is `JavaScript`, so you don’t need to include the type for JS resources.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user