forked from Icycoide/searxng
[build] /static
This commit is contained in:
parent
2f1384f198
commit
39876d9f14
18 changed files with 80 additions and 12 deletions
|
@ -299,6 +299,29 @@ $(document).ready(function(){
|
|||
$( this ).off( event );
|
||||
});
|
||||
});
|
||||
;$(document).ready(function(){
|
||||
let engine_descriptions = null;
|
||||
function load_engine_descriptions() {
|
||||
if (engine_descriptions == null) {
|
||||
$.ajax("engine_descriptions.json", dataType="json").done(function(data) {
|
||||
engine_descriptions = data;
|
||||
for (const [engine_name, description] of Object.entries(data)) {
|
||||
let elements = $('[data-engine-name="' + engine_name + '"] .description');
|
||||
for(const element of elements) {
|
||||
let source = ' (<i>' + searx.translations['Source'] + ': ' + description[1] + '</i>)';
|
||||
element.innerHTML = description[0] + source;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (document.querySelector('body[class="preferences_endpoint"]')) {
|
||||
$('[data-engine-name]').hover(function() {
|
||||
load_engine_descriptions();
|
||||
});
|
||||
}
|
||||
});
|
||||
;$(document).ready(function(){
|
||||
$("#allow-all-engines").click(function() {
|
||||
$(".onoffswitch-checkbox").each(function() { this.checked = false;});
|
||||
|
|
2
searx/static/themes/oscar/js/searx.min.js
vendored
2
searx/static/themes/oscar/js/searx.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue