resolved an issue with the button not working

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

View file

@ -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.2", "version": "0.1.3",
"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.2/duality-roller.zip" "download": "https://github.com/cptn-cosmo/DualityDiceRoller/releases/download/0.1.3/duality-roller.zip"
} }

View file

@ -61,7 +61,14 @@ function addDRButton(html) {
await runDRCommand(); await runDRCommand();
}); });
container.appendChild(btn); // fallback if fewer than 4 buttons // Append the button at the end of the roll-privacy div
const rollPrivacyDiv = container.querySelector("#roll-privacy");
if (rollPrivacyDiv) {
rollPrivacyDiv.appendChild(btn);
} else {
container.appendChild(btn); // fallback if the div doesn't exist
}
} catch (err) { } catch (err) {
console.error("DR Quick Button | addDRButton error:", err); console.error("DR Quick Button | addDRButton error:", err);
} }