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

@ -2,7 +2,7 @@
"id": "duality-roller",
"title": "Duality Dice Roller",
"description": "Adds a button next to the chat dice/controls that triggers the /dr command for the Foundryborne Daggerheart system.",
"version": "0.1.1",
"version": "0.1.2",
"compatibility": {
"minimum": "13",
"verified": "13"
@ -16,5 +16,5 @@
"languages": [],
"url": "https://github.com/cptn-cosmo/DualityDiceRoller",
"manifest": "https://github.com/cptn-cosmo/DualityDiceRoller/releases/latest/download/module.json",
"download": "https://github.com/cptn-cosmo/DualityDiceRoller/releases/download/0.1.1/duality-roller.zip"
"download": "https://github.com/cptn-cosmo/DualityDiceRoller/releases/download/0.1.2/duality-roller.zip"
}

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);
}