From 34f5e9c7a305d20bbebe907d3d1032ca04259537 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Tue, 14 Dec 2021 07:31:58 +0100 Subject: [fix] eslint --fix automatically fix some of the problems reported by eslint rules:: $ ./manage nvm.bash nvm-env$ npm --prefix searx/static/themes/simple run eslint-fix Signed-off-by: Markus Heiser --- .../themes/simple/src/js/main/preferences.js | 44 +++++++++++----------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'searx/static/themes/simple/src/js/main/preferences.js') diff --git a/searx/static/themes/simple/src/js/main/preferences.js b/searx/static/themes/simple/src/js/main/preferences.js index b19026a43..343f20826 100644 --- a/searx/static/themes/simple/src/js/main/preferences.js +++ b/searx/static/themes/simple/src/js/main/preferences.js @@ -1,28 +1,28 @@ /* SPDX-License-Identifier: AGPL-3.0-or-later */ (function (w, d, searxng) { - 'use strict'; + 'use strict'; - searxng.ready(function() { - let engine_descriptions = null; - function load_engine_descriptions() { - if (engine_descriptions == null) { - searxng.http("GET", "engine_descriptions.json").then(function(content) { - engine_descriptions = JSON.parse(content); - for (const [engine_name, description] of Object.entries(engine_descriptions)) { - let elements = d.querySelectorAll('[data-engine-name="' + engine_name + '"] .engine-description'); - for(const element of elements) { - let source = ' (' + searxng.translations['Source'] + ': ' + description[1] + ')'; - element.innerHTML = description[0] + source; - } - } - }); + searxng.ready(function () { + let engine_descriptions = null; + function load_engine_descriptions () { + if (engine_descriptions == null) { + searxng.http("GET", "engine_descriptions.json").then(function (content) { + engine_descriptions = JSON.parse(content); + for (const [engine_name, description] of Object.entries(engine_descriptions)) { + let elements = d.querySelectorAll('[data-engine-name="' + engine_name + '"] .engine-description'); + for (const element of elements) { + let source = ' (' + searxng.translations['Source'] + ': ' + description[1] + ')'; + element.innerHTML = description[0] + source; } - } + } + }); + } + } - if (d.querySelector('body[class="preferences_endpoint"]')) { - for(const el of d.querySelectorAll('[data-engine-name]')) { - searxng.on(el, 'mouseenter', load_engine_descriptions); - } - } - }); + if (d.querySelector('body[class="preferences_endpoint"]')) { + for (const el of d.querySelectorAll('[data-engine-name]')) { + searxng.on(el, 'mouseenter', load_engine_descriptions); + } + } + }); })(window, document, window.searxng); -- cgit v1.2.3