blob: d6abd6b6faa1fec1e5508474108f91856a6b6b2a (
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
var script =
d.currentScript ||
(() => {
var scripts = d.getElementsByTagName("script");
return scripts[scripts.length - 1];
})();
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);
|