[mod] theme/simple: fmt/lint major pass

*Not so safe* changes, no behaviour changes.

- More ES5 to ES2015+ conversion.
- Make Biome not cry anymore applying remaining changes.
This commit is contained in:
Ivan Gabaldon
2025-06-28 11:10:58 +02:00
committed by Markus Heiser
parent 95172213f6
commit 879ac4e60f
15 changed files with 167 additions and 150 deletions

View File

@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: AGPL-3.0-or-later */
((w, d, searxng) => {
((_w, d, searxng) => {
if (searxng.endpoint !== "preferences") {
return;
}
@@ -12,9 +12,9 @@
searxng.http("GET", "engine_descriptions.json").then((content) => {
engine_descriptions = JSON.parse(content);
for (const [engine_name, description] of Object.entries(engine_descriptions)) {
const elements = d.querySelectorAll('[data-engine-name="' + engine_name + '"] .engine-description');
const elements = d.querySelectorAll(`[data-engine-name="${engine_name}"] .engine-description`);
for (const element of elements) {
const source = " (<i>" + searxng.settings.translations.Source + ":&nbsp;" + description[1] + "</i>)";
const source = ` (<i>${searxng.settings.translations.Source}:&nbsp;${description[1]}</i>)`;
element.innerHTML = description[0] + source;
}
}