fix error message
This commit is contained in:
parent
be93f60b6f
commit
088ea79995
2 changed files with 3 additions and 9 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
"id": "duality-roller",
|
"id": "duality-roller",
|
||||||
"title": "Duality Dice 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.",
|
"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": {
|
"compatibility": {
|
||||||
"minimum": "13",
|
"minimum": "13",
|
||||||
"verified": "13"
|
"verified": "13"
|
||||||
|
|
@ -16,5 +16,5 @@
|
||||||
"languages": [],
|
"languages": [],
|
||||||
"url": "https://github.com/cptn-cosmo/DualityDiceRoller",
|
"url": "https://github.com/cptn-cosmo/DualityDiceRoller",
|
||||||
"manifest": "https://github.com/cptn-cosmo/DualityDiceRoller/releases/latest/download/module.json",
|
"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"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -61,13 +61,7 @@ function addDRButton(html) {
|
||||||
await runDRCommand();
|
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) {
|
} catch (err) {
|
||||||
console.error("DR Quick Button | addDRButton error:", err);
|
console.error("DR Quick Button | addDRButton error:", err);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue