searxng/searx/static/themes/simple/js/infinite_scroll.min.js
dependabot[bot] 687121d584
[upd] web-client (simple): Bump the minor group in /client/simple with 2 updates (#5202)
* [upd] web-client (simple): Bump the minor group

Bumps the minor group in /client/simple with 2 updates: [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) and [stylelint](https://github.com/stylelint/stylelint).


Updates `@biomejs/biome` from 2.2.2 to 2.2.4
- [Release notes](https://github.com/biomejs/biome/releases)
- [Changelog](https://github.com/biomejs/biome/blob/main/packages/@biomejs/biome/CHANGELOG.md)
- [Commits](https://github.com/biomejs/biome/commits/@biomejs/biome@2.2.4/packages/@biomejs/biome)

Updates `stylelint` from 16.23.1 to 16.24.0
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/16.23.1...16.24.0)

---
updated-dependencies:
- dependency-name: "@biomejs/biome"
  dependency-version: 2.2.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: minor
- dependency-name: stylelint
  dependency-version: 16.24.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* update biome schema

* update rolldown

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ivan Gabaldon <igabaldon@inetol.net>
2025-09-12 10:59:25 +02:00

2 lines
1.6 KiB
JavaScript

import{n as e,o as t,r as n}from"./searxng.core.min.js";var r=()=>Object.assign(document.createElement(`div`),{className:`loader`}),i=async(i,a)=>{let o=document.querySelector(`#search`);e(o);let s=document.querySelector(`#pagination form.next_page`);e(s);let c=o.getAttribute(`action`);if(!c)throw Error(`Form action not defined`);let l=document.querySelector(`#pagination`);e(l),l.replaceChildren(r());try{let e=await(await n(`POST`,c,{body:new FormData(s)})).text();if(!e)return;let t=new DOMParser().parseFromString(e,`text/html`),r=t.querySelectorAll(`#urls article`),o=t.querySelector(`#pagination`);document.querySelector(`#pagination`)?.remove();let l=document.querySelector(`#urls`);if(!l)throw Error(`URLs element not found`);r.length>0&&!i&&l.appendChild(document.createElement(`hr`)),l.append(...Array.from(r)),o&&(document.querySelector(`#results`)?.appendChild(o),a())}catch(e){console.error(`Error loading next page:`,e);let n=Object.assign(document.createElement(`div`),{textContent:t.translations?.error_loading_next_page??`Error loading next page`,className:`dialog-error`});n.setAttribute(`role`,`alert`),document.querySelector(`#pagination`)?.replaceChildren(n)}},a=document.getElementById(`results`);if(!a)throw Error(`Results element not found`);var o=a.classList.contains(`only_template_images`),s=`article.result:last-child`,c=new IntersectionObserver(e=>{let[t]=e;t?.isIntersecting&&(c.unobserve(t.target),i(o,()=>{let e=document.querySelector(s);e&&c.observe(e)}).then(()=>{}))},{rootMargin:`320px`}),l=document.querySelector(s);l&&c.observe(l);
//# sourceMappingURL=infinite_scroll.min.js.map