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,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")))
|
||||
|
||||
Reference in New Issue
Block a user