mirror of
https://github.com/searxng/searxng.git
synced 2025-07-16 17:59:30 +02:00
[web-client] simple theme: move sources to client/simple/src
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
b6487b70aa
commit
a1132deaa4
33 changed files with 5 additions and 2 deletions
20
client/simple/src/js/head/00_init.js
Normal file
20
client/simple/src/js/head/00_init.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
/* SPDX-License-Identifier: AGPL-3.0-or-later */
|
||||
(function (w, d) {
|
||||
'use strict';
|
||||
|
||||
// add data- properties
|
||||
var script = d.currentScript || (function () {
|
||||
var scripts = d.getElementsByTagName('script');
|
||||
return scripts[scripts.length - 1];
|
||||
})();
|
||||
|
||||
w.searxng = {
|
||||
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');
|
||||
|
||||
})(window, document);
|
Loading…
Add table
Add a link
Reference in a new issue