diff --git a/README.md b/README.md index a6eab61..7a19c95 100644 --- a/README.md +++ b/README.md @@ -815,8 +815,6 @@ This is the way I construct my JavaScript files. ```js (function () { - 'use strict'; - // Add a js class to the html-tag when JavsScript is active. document.querySelector('html').classList.replace('nojs', 'js'); @@ -829,8 +827,6 @@ This is the way I construct my JavaScript files. ```js (function ($) { - 'use strict'; - // Add your code here. $('html').removeClass('nojs').addClass('js'); @@ -842,8 +838,6 @@ This is the way I construct my JavaScript files. ```js (function ($) { - 'use strict'; - // Add your code here. $('html').removeClass('nojs').addClass('js'); diff --git a/assets/js/contact.js b/assets/js/contact.js index 025263e..ac7a344 100644 --- a/assets/js/contact.js +++ b/assets/js/contact.js @@ -4,9 +4,6 @@ */ (function () { - - 'use strict'; - const form = document.querySelector('.contact-form'); const button = form.querySelector('[type=submit]'); const action = form.getAttribute('data-protect'); diff --git a/assets/js/cookieconsent.js b/assets/js/cookieconsent.js index 835a275..c6bd01a 100644 --- a/assets/js/cookieconsent.js +++ b/assets/js/cookieconsent.js @@ -4,9 +4,6 @@ */ (function () { - - 'use strict'; - const cookiebanner = document.querySelector('.cookieconsent'); const cookieconsent = localStorage.getItem('cookieconsent'); diff --git a/assets/js/math.js b/assets/js/math.js index 7e2c14e..9129e11 100644 --- a/assets/js/math.js +++ b/assets/js/math.js @@ -4,11 +4,7 @@ */ (function () { - - 'use strict'; - document.addEventListener('DOMContentLoaded', function () { - // eslint-disable-next-line no-undef renderMathInElement(document.body, { delimiters: [ {left: '\\[', right: '\\]', display: true}, // block diff --git a/assets/js/mobile.js b/assets/js/mobile.js index 7c1851c..228be0d 100644 --- a/assets/js/mobile.js +++ b/assets/js/mobile.js @@ -4,9 +4,6 @@ */ (function () { - - 'use strict'; - const nav = document.querySelector('.mobile-nav'); const sheet = document.querySelector('.mobile-nav__sheet'); const toggle = document.querySelector('.mobile-nav__toggle'); diff --git a/assets/js/script-early.js b/assets/js/script-early.js index 0f486f5..4364456 100644 --- a/assets/js/script-early.js +++ b/assets/js/script-early.js @@ -4,9 +4,6 @@ */ (function () { - - 'use strict'; - // Add a js class to the html-tag when JavsScript is active. document.querySelector('html').classList.replace('nojs', 'js'); diff --git a/assets/js/script.js b/assets/js/script.js index 78d2859..df1b092 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -5,8 +5,6 @@ (function () { - 'use strict'; - // Place your code here. })(); diff --git a/assets/js/search.js b/assets/js/search.js index 4474026..c8abbf3 100644 --- a/assets/js/search.js +++ b/assets/js/search.js @@ -3,15 +3,9 @@ * A JavaScript file for flexsearch. */ -/* eslint-disable */ import * as params from '@params'; -/* eslint-enable */ -/* eslint-disable no-undef, guard-for-in */ (function () { - - 'use strict'; - const index = new FlexSearch.Document({ document: { id: 'id', diff --git a/assets/js/tables.js b/assets/js/tables.js index 282c248..b2650a8 100644 --- a/assets/js/tables.js +++ b/assets/js/tables.js @@ -3,11 +3,7 @@ * A JavaScript file for responsive tables. */ -/* eslint-disable max-nested-callbacks */ (function () { - - 'use strict'; - const tables = document.querySelectorAll('.responsive-table'); tables.forEach(function (table) { diff --git a/assets/js/tracking.js b/assets/js/tracking.js index de00fde..43d8b93 100644 --- a/assets/js/tracking.js +++ b/assets/js/tracking.js @@ -3,11 +3,8 @@ * A JavaScript file for analytic tracking. */ -/* eslint-disable */ import * as params from '@params'; -/* eslint-enable */ -/* eslint-disable no-undef */ const cookiebanner = params.cookieConsent; const cookieconsent = localStorage.getItem('cookieconsent'); const idSite = params.piwikSiteID;