mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-08-15 18:53:02 +02:00
'Download all images' button (#765)
* Use standard DOM function * Add 'download all images' button --------- Co-authored-by: cmdr2 <secondary.cmdr2@gmail.com>
This commit is contained in:
@ -20,19 +20,6 @@ function getNextSibling(elem, selector) {
|
||||
}
|
||||
}
|
||||
|
||||
function findClosestAncestor(element, selector) {
|
||||
if (!element || !element.parentNode) {
|
||||
// reached the top of the DOM tree, return null
|
||||
return null;
|
||||
} else if (element.parentNode.matches(selector)) {
|
||||
// found an ancestor that matches the selector, return it
|
||||
return element.parentNode;
|
||||
} else {
|
||||
// continue searching upwards
|
||||
return findClosestAncestor(element.parentNode, selector);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Panel Stuff */
|
||||
|
||||
|
Reference in New Issue
Block a user