Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Showing
7 changed files
with
82 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
/* SPDX-License-Identifier: AGPL-3.0-or-later */ | ||
(function (w, d, searxng) { | ||
'use strict'; | ||
'use strict'; | ||
|
||
searxng.ready(function() { | ||
let engine_descriptions = null; | ||
function load_engine_descriptions() { | ||
if (engine_descriptions == null) { | ||
searxng.http("GET", "engine_descriptions.json").then(function(content) { | ||
engine_descriptions = JSON.parse(content); | ||
for (const [engine_name, description] of Object.entries(engine_descriptions)) { | ||
let elements = d.querySelectorAll('[data-engine-name="' + engine_name + '"] .engine-description'); | ||
for(const element of elements) { | ||
let source = ' (<i>' + searxng.translations['Source'] + ': ' + description[1] + '</i>)'; | ||
element.innerHTML = description[0] + source; | ||
} | ||
} | ||
}); | ||
searxng.ready(function() { | ||
let engine_descriptions = null; | ||
function load_engine_descriptions() { | ||
if (engine_descriptions == null) { | ||
searxng.http("GET", "engine_descriptions.json").then(function(content) { | ||
engine_descriptions = JSON.parse(content); | ||
for (const [engine_name, description] of Object.entries(engine_descriptions)) { | ||
let elements = d.querySelectorAll('[data-engine-name="' + engine_name + '"] .engine-description'); | ||
for(const element of elements) { | ||
let source = ' (<i>' + searxng.translations['Source'] + ': ' + description[1] + '</i>)'; | ||
element.innerHTML = description[0] + source; | ||
} | ||
} | ||
} | ||
}); | ||
} | ||
} | ||
|
||
if (d.querySelector('body[class="preferences_endpoint"]')) { | ||
for(const el of d.querySelectorAll('[data-engine-name]')) { | ||
searxng.on(el, 'mouseenter', load_engine_descriptions); | ||
} | ||
} | ||
}); | ||
if (d.querySelector('body[class="preferences_endpoint"]')) { | ||
for(const el of d.querySelectorAll('[data-engine-name]')) { | ||
searxng.on(el, 'mouseenter', load_engine_descriptions); | ||
} | ||
} | ||
}); | ||
})(window, document, window.searxng); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,5 +15,5 @@ module.exports = { | |
// Optimize SVG for WEB usage | ||
'convertStyleToAttrs', | ||
'removeXMLNS' | ||
], | ||
], | ||
}; |