blob: 7aec676a404f54e522e5d77745df710ae4bf11ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
/* SPDX-License-Identifier: AGPL-3.0-or-later */
((w, d) => {
// add data- properties
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")))
};
// update the css
const htmlElement = d.getElementsByTagName("html")[0];
htmlElement.classList.remove("no-js");
htmlElement.classList.add("js");
})(window, document);
|