mirror of
https://github.com/searxng/searxng.git
synced 2025-07-16 17:59:30 +02: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:
parent
95172213f6
commit
879ac4e60f
15 changed files with 167 additions and 150 deletions
|
@ -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")))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue