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

*Safe* changes, no behaviour changes.

- Initial ES5 to ES2015+ conversion.
- Plenty of styling diff changes.
This commit is contained in:
Ivan Gabaldon 2025-06-28 10:19:15 +02:00 committed by Markus Heiser
parent a947d5b3cf
commit 95172213f6
13 changed files with 620 additions and 650 deletions

View file

@ -1,20 +1,19 @@
/* SPDX-License-Identifier: AGPL-3.0-or-later */
(function (w, d) {
'use strict';
((w, d) => {
// add data- properties
var script = d.currentScript || (function () {
var scripts = d.getElementsByTagName('script');
return scripts[scripts.length - 1];
})();
var script =
d.currentScript ||
(() => {
var scripts = d.getElementsByTagName("script");
return scripts[scripts.length - 1];
})();
w.searxng = {
settings: JSON.parse(atob(script.getAttribute('client_settings')))
settings: JSON.parse(atob(script.getAttribute("client_settings")))
};
// update the css
var htmlElement = d.getElementsByTagName("html")[0];
htmlElement.classList.remove('no-js');
htmlElement.classList.add('js');
const htmlElement = d.getElementsByTagName("html")[0];
htmlElement.classList.remove("no-js");
htmlElement.classList.add("js");
})(window, document);