[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:
Alexandre Flament
2022-02-20 22:58:51 +01:00
co-authored by Markus Heiser
parent 36aee70c24
commit 56e34947a6
23 changed files with 314 additions and 121 deletions
@@ -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);