mirror of
https://github.com/nuttylmao/nutty.gg.git
synced 2026-09-18 19:50:58 -04:00
Fixed bug where alerts would get "queued up" when the tab is inactive.
This commit is contained in:
@@ -1191,6 +1191,14 @@ function GetWinnersList(gifts) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function UpdateAlertBox(platform, avatarURL, headerText, descriptionText, attributeText, username, message, sbAction, sbData) {
|
function UpdateAlertBox(platform, avatarURL, headerText, descriptionText, attributeText, username, message, sbAction, sbData) {
|
||||||
|
// If the page is inactive (e.g. the alert browser source is on an inactive OBS scene)
|
||||||
|
// don't run the alert
|
||||||
|
if (document.visibilityState != 'visible')
|
||||||
|
{
|
||||||
|
console.debug('Tab is inactive. Skipping alert...');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Check if the widget is in the middle of an animation
|
// Check if the widget is in the middle of an animation
|
||||||
// If any alerts are requested while the animation is playing, it should be added to the alert queue
|
// If any alerts are requested while the animation is playing, it should be added to the alert queue
|
||||||
if (widgetLocked) {
|
if (widgetLocked) {
|
||||||
|
|||||||
Reference in New Issue
Block a user