[mod] infinite_scroll as preference
* oscar theme: code from searx/plugins/infinite_scroll.py * simple theme: new implementation Co-authored-by: Markus Heiser <markus.heiser@darmarIT.de>
This commit is contained in:
co-authored by
Markus Heiser
parent
36aee70c24
commit
56e34947a6
@@ -2,6 +2,10 @@
|
||||
(function (w, d, searxng) {
|
||||
'use strict';
|
||||
|
||||
if (searxng.endpoint !== 'preferences') {
|
||||
return;
|
||||
}
|
||||
|
||||
searxng.ready(function () {
|
||||
let engine_descriptions = null;
|
||||
function load_engine_descriptions () {
|
||||
@@ -19,10 +23,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (d.querySelector('body[class="preferences_endpoint"]')) {
|
||||
for (const el of d.querySelectorAll('[data-engine-name]')) {
|
||||
searxng.on(el, 'mouseenter', load_engine_descriptions);
|
||||
}
|
||||
for (const el of d.querySelectorAll('[data-engine-name]')) {
|
||||
searxng.on(el, 'mouseenter', load_engine_descriptions);
|
||||
}
|
||||
});
|
||||
})(window, document, window.searxng);
|
||||
|
||||
Reference in New Issue
Block a user