fix error message

This commit is contained in:
CPTN Cosmo 2025-08-31 23:19:29 +02:00
parent be93f60b6f
commit 088ea79995
2 changed files with 3 additions and 9 deletions

View file

@ -61,13 +61,7 @@ function addDRButton(html) {
await runDRCommand();
});
// Insert as the 5th button in the row (index 4, since it's 0-based)
const buttons = container.querySelectorAll("button");
if (buttons.length >= 4) {
container.insertBefore(btn, buttons[4]); // before the current 5th button
} else {
container.appendChild(btn); // fallback if fewer than 4 buttons
}
container.appendChild(btn); // fallback if fewer than 4 buttons
} catch (err) {
console.error("DR Quick Button | addDRButton error:", err);
}