mirror of
https://github.com/searxng/searxng.git
synced 2026-09-14 18:26:04 +00:00
[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:
committed by
Markus Heiser
parent
95172213f6
commit
879ac4e60f
@@ -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 + ": " + description[1] + "</i>)";
|
||||
const source = ` (<i>${searxng.settings.translations.Source}: ${description[1]}</i>)`;
|
||||
element.innerHTML = description[0] + source;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user