mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-11 04:05:10 +02:00
Refactor and fix archive link bug (#30535)
Regression of #29920 Fixes: #30569 Also this is a rewriting to eliminate the remaining jQuery usages from code. Co-authored-by: Giteabot <teabot@gitea.io> (cherry picked from commit d0e07083559180b124a08359fcc72f9ef695e723) Conflicts: - web_src/js/features/repo-common.js Conflict resolved in favour of Gitea.
This commit is contained in:
parent
9d6974d1f8
commit
cbdf32126f
2 changed files with 26 additions and 32 deletions
|
@ -55,6 +55,10 @@ export function queryElemSiblings(el, selector) {
|
|||
return Array.from(el.parentNode.children).filter((child) => child !== el && child.matches(selector));
|
||||
}
|
||||
|
||||
export function queryElems(selector, fn) {
|
||||
return applyElemsCallback(document.querySelectorAll(selector), fn);
|
||||
}
|
||||
|
||||
export function onDomReady(cb) {
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', cb);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue