diff --git a/Main.js b/Main.js index 2e19499ff..1be4ecaf4 100644 --- a/Main.js +++ b/Main.js @@ -2084,39 +2084,24 @@ function monitor_character_sidebar_changes() { * @returns */ function inject_chat_buttons() { - if ($(".glc-game-log").find("#chat-text").length > 0) { + const gameLog = $(".glc-game-log"); + if (gameLog.find("#chat-text").length > 0) { // make sure we only ever inject these once. This gets called a lot on the character sheet which is intentional, but just in case we accidentally call it too many times, let's log it, and return return; } - // AGGIUNGI CHAT - // the text has to be up against the left for it to style correctly - $(".glc-game-log").append($(``)); - - const languageSelect= $(``) - const ignoredLanguages = ['All']; - - const knownLanguages = get_my_known_languages(); - for (const language of window.ddbConfigJson.languages) { - if (ignoredLanguages.includes(language.name)) - continue; - if (!window.DM && !knownLanguages.includes(language.name)) - continue; - const option = $(``) - languageSelect.append(option); - } - - $(".glc-game-log").append(languageSelect); - $(".glc-game-log").append($(` + const chatTextWrapper = $(`` + ); + const diceRoller = $(`
d4 @@ -2140,7 +2125,21 @@ Disadvantage: 2d20kl1 (keep lowest) d20
- `)); + `) + const languageSelect= $(``) + const ignoredLanguages = ['All']; + + const knownLanguages = get_my_known_languages(); + for (const language of window.ddbConfigJson.languages) { + if (ignoredLanguages.includes(language.name)) + continue; + if (!window.DM && !knownLanguages.includes(language.name)) + continue; + const option = $(``) + languageSelect.append(option); + } + + gameLog.append(chatTextWrapper, languageSelect, diceRoller); $(".dice-roller > div img").on("click", function(e) { if ($(".dice-toolbar__dropdown").length > 0 && !window.EXPERIMENTAL_SETTINGS['rpgRoller']) { diff --git a/abovevtt.css b/abovevtt.css index b331c107a..ae8a83de4 100644 --- a/abovevtt.css +++ b/abovevtt.css @@ -3559,8 +3559,7 @@ div#selectedTokensBorder { } .abovevtt-roll-container .above-vtt-roll-whisper { - position: absolute; - top: 28px; + position: relative; left: 0px; width: 220px; text-wrap: nowrap; @@ -3569,6 +3568,7 @@ div#selectedTokensBorder { color: #716f6f; font-size: 10px; font-weight: bold; + line-height: 1; } div.token-image { width: 100%;