summaryrefslogtreecommitdiff
path: root/searx/static/themes/simple/src/js/head
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2021-12-14 07:31:58 +0100
committerMarkus Heiser <markus.heiser@darmarit.de>2021-12-14 07:31:58 +0100
commit34f5e9c7a305d20bbebe907d3d1032ca04259537 (patch)
tree7ed2b6395ae251279183ae2a5afffc53a5fcf059 /searx/static/themes/simple/src/js/head
parent32cf24a2727c2db5b7b7187a355fd20382b5e40c (diff)
[fix] eslint --fix
automatically fix some of the problems reported by eslint rules:: $ ./manage nvm.bash nvm-env$ npm --prefix searx/static/themes/simple run eslint-fix Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/static/themes/simple/src/js/head')
-rw-r--r--searx/static/themes/simple/src/js/head/00_init.js58
1 files changed, 29 insertions, 29 deletions
diff --git a/searx/static/themes/simple/src/js/head/00_init.js b/searx/static/themes/simple/src/js/head/00_init.js
index dab0e368a..073371ce6 100644
--- a/searx/static/themes/simple/src/js/head/00_init.js
+++ b/searx/static/themes/simple/src/js/head/00_init.js
@@ -5,36 +5,36 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
/* global DocumentTouch:readonly */
-(function(w, d) {
- 'use strict';
+(function (w, d) {
+ 'use strict';
- // add data- properties
- var script = d.currentScript || (function() {
- var scripts = d.getElementsByTagName('script');
- return scripts[scripts.length - 1];
- })();
+ // add data- properties
+ var script = d.currentScript || (function () {
+ var scripts = d.getElementsByTagName('script');
+ return scripts[scripts.length - 1];
+ })();
- // try to detect touch screen
- w.searxng = {
- touch: (("ontouchstart" in w) || w.DocumentTouch && document instanceof DocumentTouch) || false,
- method: script.getAttribute('data-method'),
- autocompleter: script.getAttribute('data-autocompleter') === 'true',
- search_on_category_select: script.getAttribute('data-search-on-category-select') === 'true',
- infinite_scroll: script.getAttribute('data-infinite-scroll') === 'true',
- hotkeys: script.getAttribute('data-hotkeys') === 'true',
- static_path: script.getAttribute('data-static-path'),
- translations: JSON.parse(script.getAttribute('data-translations')),
- theme : {
- // image that is displayed if load of <img src='...'> failed
- img_load_error: 'img/img_load_error.svg'
- }
- };
-
- // update the css
- var hmtlElement = d.getElementsByTagName("html")[0];
- hmtlElement.classList.remove('no-js');
- hmtlElement.classList.add('js');
- if (w.searxng.touch) {
- hmtlElement.classList.add('touch');
+ // try to detect touch screen
+ w.searxng = {
+ touch: (("ontouchstart" in w) || w.DocumentTouch && document instanceof DocumentTouch) || false,
+ method: script.getAttribute('data-method'),
+ autocompleter: script.getAttribute('data-autocompleter') === 'true',
+ search_on_category_select: script.getAttribute('data-search-on-category-select') === 'true',
+ infinite_scroll: script.getAttribute('data-infinite-scroll') === 'true',
+ hotkeys: script.getAttribute('data-hotkeys') === 'true',
+ static_path: script.getAttribute('data-static-path'),
+ translations: JSON.parse(script.getAttribute('data-translations')),
+ theme: {
+ // image that is displayed if load of <img src='...'> failed
+ img_load_error: 'img/img_load_error.svg'
}
+ };
+
+ // update the css
+ var hmtlElement = d.getElementsByTagName("html")[0];
+ hmtlElement.classList.remove('no-js');
+ hmtlElement.classList.add('js');
+ if (w.searxng.touch) {
+ hmtlElement.classList.add('touch');
+ }
})(window, document); \ No newline at end of file