Remove redundant use strict directive.

This commit is contained in:
Fredrik Jonsson 2024-12-20 12:22:09 +01:00
commit 92dd57684d
10 changed files with 0 additions and 37 deletions

View file

@ -815,8 +815,6 @@ This is the way I construct my JavaScript files.
```js ```js
(function () { (function () {
'use strict';
// Add a js class to the html-tag when JavsScript is active. // Add a js class to the html-tag when JavsScript is active.
document.querySelector('html').classList.replace('nojs', 'js'); document.querySelector('html').classList.replace('nojs', 'js');
@ -829,8 +827,6 @@ This is the way I construct my JavaScript files.
```js ```js
(function ($) { (function ($) {
'use strict';
// Add your code here. // Add your code here.
$('html').removeClass('nojs').addClass('js'); $('html').removeClass('nojs').addClass('js');
@ -842,8 +838,6 @@ This is the way I construct my JavaScript files.
```js ```js
(function ($) { (function ($) {
'use strict';
// Add your code here. // Add your code here.
$('html').removeClass('nojs').addClass('js'); $('html').removeClass('nojs').addClass('js');

View file

@ -4,9 +4,6 @@
*/ */
(function () { (function () {
'use strict';
const form = document.querySelector('.contact-form'); const form = document.querySelector('.contact-form');
const button = form.querySelector('[type=submit]'); const button = form.querySelector('[type=submit]');
const action = form.getAttribute('data-protect'); const action = form.getAttribute('data-protect');

View file

@ -4,9 +4,6 @@
*/ */
(function () { (function () {
'use strict';
const cookiebanner = document.querySelector('.cookieconsent'); const cookiebanner = document.querySelector('.cookieconsent');
const cookieconsent = localStorage.getItem('cookieconsent'); const cookieconsent = localStorage.getItem('cookieconsent');

View file

@ -4,11 +4,7 @@
*/ */
(function () { (function () {
'use strict';
document.addEventListener('DOMContentLoaded', function () { document.addEventListener('DOMContentLoaded', function () {
// eslint-disable-next-line no-undef
renderMathInElement(document.body, { renderMathInElement(document.body, {
delimiters: [ delimiters: [
{left: '\\[', right: '\\]', display: true}, // block {left: '\\[', right: '\\]', display: true}, // block

View file

@ -4,9 +4,6 @@
*/ */
(function () { (function () {
'use strict';
const nav = document.querySelector('.mobile-nav'); const nav = document.querySelector('.mobile-nav');
const sheet = document.querySelector('.mobile-nav__sheet'); const sheet = document.querySelector('.mobile-nav__sheet');
const toggle = document.querySelector('.mobile-nav__toggle'); const toggle = document.querySelector('.mobile-nav__toggle');

View file

@ -4,9 +4,6 @@
*/ */
(function () { (function () {
'use strict';
// Add a js class to the html-tag when JavsScript is active. // Add a js class to the html-tag when JavsScript is active.
document.querySelector('html').classList.replace('nojs', 'js'); document.querySelector('html').classList.replace('nojs', 'js');

View file

@ -5,8 +5,6 @@
(function () { (function () {
'use strict';
// Place your code here. // Place your code here.
})(); })();

View file

@ -3,15 +3,9 @@
* A JavaScript file for flexsearch. * A JavaScript file for flexsearch.
*/ */
/* eslint-disable */
import * as params from '@params'; import * as params from '@params';
/* eslint-enable */
/* eslint-disable no-undef, guard-for-in */
(function () { (function () {
'use strict';
const index = new FlexSearch.Document({ const index = new FlexSearch.Document({
document: { document: {
id: 'id', id: 'id',

View file

@ -3,11 +3,7 @@
* A JavaScript file for responsive tables. * A JavaScript file for responsive tables.
*/ */
/* eslint-disable max-nested-callbacks */
(function () { (function () {
'use strict';
const tables = document.querySelectorAll('.responsive-table'); const tables = document.querySelectorAll('.responsive-table');
tables.forEach(function (table) { tables.forEach(function (table) {

View file

@ -3,11 +3,8 @@
* A JavaScript file for analytic tracking. * A JavaScript file for analytic tracking.
*/ */
/* eslint-disable */
import * as params from '@params'; import * as params from '@params';
/* eslint-enable */
/* eslint-disable no-undef */
const cookiebanner = params.cookieConsent; const cookiebanner = params.cookieConsent;
const cookieconsent = localStorage.getItem('cookieconsent'); const cookieconsent = localStorage.getItem('cookieconsent');
const idSite = params.piwikSiteID; const idSite = params.piwikSiteID;