mirror of
https://github.com/searxng/searxng.git
synced 2025-07-15 09:19:20 +02:00
simple theme update
- npm package update - apply #1226 - implement vim help dialog - display cookies and search URL with preferences - allow to enable / disable Open Access DOI rewrite - add a clear text button on the left of the search button - implement #1011 : the HTML title page is not set when using POST - remove searx/static/themes/simple/img/loader.gif - use full width when only there are only images as result
This commit is contained in:
parent
845ba79e75
commit
3ba0d0516e
39 changed files with 1755 additions and 1211 deletions
|
@ -33,6 +33,26 @@
|
|||
}
|
||||
}
|
||||
|
||||
function createClearButton(qinput) {
|
||||
var cs = document.getElementById('clear_search');
|
||||
var updateClearButton = function() {
|
||||
if (qinput.value.length === 0) {
|
||||
cs.classList.add("empty");
|
||||
} else {
|
||||
cs.classList.remove("empty");
|
||||
}
|
||||
};
|
||||
|
||||
// update status, event listener
|
||||
updateClearButton();
|
||||
cs.addEventListener('click', function() {
|
||||
qinput.value='';
|
||||
qinput.focus();
|
||||
updateClearButton();
|
||||
});
|
||||
qinput.addEventListener('keyup', updateClearButton, false);
|
||||
}
|
||||
|
||||
searx.ready(function() {
|
||||
qinput = d.getElementById(qinput_id);
|
||||
|
||||
|
@ -46,6 +66,9 @@
|
|||
}
|
||||
|
||||
if (qinput !== null) {
|
||||
// clear button
|
||||
createClearButton(qinput);
|
||||
|
||||
// autocompleter
|
||||
if (searx.autocompleter) {
|
||||
searx.autocomplete = AutoComplete.call(w, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue