summaryrefslogtreecommitdiff
path: root/searx/plugins/infinite_scroll.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/plugins/infinite_scroll.py')
-rw-r--r--searx/plugins/infinite_scroll.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/searx/plugins/infinite_scroll.py b/searx/plugins/infinite_scroll.py
new file mode 100644
index 000000000..495d3e230
--- /dev/null
+++ b/searx/plugins/infinite_scroll.py
@@ -0,0 +1,28 @@
+# SPDX-License-Identifier: AGPL-3.0-or-later
+# pylint: disable=missing-module-docstring
+
+import typing as t
+
+from flask_babel import gettext # pyright: ignore[reportUnknownVariableType]
+
+from searx.plugins import Plugin, PluginInfo
+
+if t.TYPE_CHECKING:
+ from searx.plugins import PluginCfg
+
+
+@t.final
+class SXNGPlugin(Plugin):
+ """Automatically loads the next page when scrolling to bottom of the current page."""
+
+ id = "infiniteScroll"
+
+ def __init__(self, plg_cfg: "PluginCfg") -> None:
+ super().__init__(plg_cfg)
+
+ self.info = PluginInfo(
+ id=self.id,
+ name=gettext("Infinite scroll"),
+ description=gettext("Automatically loads the next page when scrolling to bottom of the current page"),
+ preference_section="ui",
+ )