Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions play.js
Original file line number Diff line number Diff line change
Expand Up @@ -1034,10 +1034,18 @@ document.getElementById('globalMessageButton').onclick = function () {
this.classList.toggle('toggled');
const chatInput = document.getElementById('chatInput');
const toggled = this.classList.contains('toggled');
if (toggled)
chatInput.dataset.global = true;
else
delete chatInput.dataset.global;

// Only let globe change message destination if all chat is actually
// selected, otherwise this only updates the visuals of the button,
// since this function is over-used by the config loader for that.
const active = document.getElementById("chatTabAll").classList.contains("active");
if (active) {
if (toggled)
chatInput.dataset.global = true;
else
delete chatInput.dataset.global;
}

chatInput.disabled = toggled && document.getElementById('chatInputContainer').classList.contains('globalCooldown');
config.globalMessage = toggled;
updateConfig(config);
Expand Down Expand Up @@ -3149,4 +3157,4 @@ if (!globalConfig.rulesReviewed) {
openModal('warningsModal');
globalConfig.warningsReviewed = true;
updateConfig(globalConfig, true);
}
}