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 = $(`