[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,12 +1,12 @@
/* SPDX-License-Identifier: AGPL-3.0-or-later */
((w, d) => {
// add data- properties
var script =
d.currentScript ||
(() => {
var scripts = d.getElementsByTagName("script");
return scripts[scripts.length - 1];
})();
const getLastScriptElement = () => {
const scripts = d.getElementsByTagName("script");
return scripts[scripts.length - 1];
};
const script = d.currentScript || getLastScriptElement();
w.searxng = {
settings: JSON.parse(atob(script.getAttribute("client_settings")))