From 088ea799950be27d5e60955ee067d5bcb2113e4c Mon Sep 17 00:00:00 2001 From: cptn-cosmo Date: Sun, 31 Aug 2025 23:19:29 +0200 Subject: [PATCH] fix error message --- module.json | 4 ++-- scripts/dr-button.js | 8 +------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/module.json b/module.json index 20272ab..2b74d94 100644 --- a/module.json +++ b/module.json @@ -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" } diff --git a/scripts/dr-button.js b/scripts/dr-button.js index ce87b12..603807b 100644 --- a/scripts/dr-button.js +++ b/scripts/dr-button.js @@ -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); }