Skip to content

Instantly share code, notes, and snippets.

View Azd325's full-sized avatar
🏠
Working from home

Tim Kleinschmidt Azd325

🏠
Working from home
View GitHub Profile
@Azd325
Azd325 / download.js
Created February 23, 2025 13:07
Helper to download documents from DKB
async function clickWithDelayReverse(selector, delay) {
const buttons = Array.from(document.querySelectorAll(selector)).reverse(); // Convert to array & reverse
for (const [index, button] of buttons.entries()) {
console.log(`Clicking button ${buttons.length - index} in reverse order`);
button.click();
await new Promise(resolve => setTimeout(resolve, delay)); // Wait before next click
}
console.log("All downloads triggered in reverse order.");

Keybase proof

I hereby claim:

  • I am azd325 on github.
  • I am azd325 (https://keybase.io/azd325) on keybase.
  • I have a public key ASA5ZEs5r9yZMFDhtTmjYGGFxDLxbq30ShL4CZMXaanifQo

To claim this, I am signing this object: