Merge pull request #582 from return42/fix-autocomplete-csp

[fix] simple theme: make autocomplete-js CSP compliant
This commit is contained in:
Alexandre Flament 2021-12-08 20:28:35 +01:00 committed by GitHub
commit 2a262df0bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View File

@ -54,7 +54,7 @@
if (qinput !== null) {
// clear button
createClearButton(qinput);
// autocompleter
if (searxng.autocompleter) {
searxng.autocomplete = AutoComplete.call(w, {
@ -67,6 +67,12 @@
},
MinChars: 4,
Delay: 300,
_Position:function() {
this.DOMResults.setAttribute("class", "autocomplete");
this.DOMResults.style.top = (this.Input.offsetTop + this.Input.offsetHeight) + "px";
this.DOMResults.style.left = this.Input.offsetLeft + "px";
this.DOMResults.style.width = this.Input.clientWidth + "px";
},
}, "#" + qinput_id);
// hack, see : https://github.com/autocompletejs/autocomplete.js/issues/37