mirror of
https://github.com/nuttylmao/nutty.gg.git
synced 2026-09-18 19:50:58 -04:00
Added box height info + alert duration to doAction calls
This commit is contained in:
@@ -1236,6 +1236,16 @@ function UpdateAlertBox(platform, avatarURL, headerText, descriptionText, attrib
|
|||||||
audio.play();
|
audio.play();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add extra useful info to sbData
|
||||||
|
if (!sbData)
|
||||||
|
sbData = {};
|
||||||
|
|
||||||
|
sbData.boxHeight1 = theContentThatShowsFirstInsteadOfSecond.offsetHeight;
|
||||||
|
sbData.boxHeight2 = (message && showMesesages) ? theContentThatShowsLastInsteadOfFirst.offsetHeight : 0;
|
||||||
|
sbData.alertDuration = hideAfter * 1000;
|
||||||
|
|
||||||
|
console.log(sbData);
|
||||||
|
|
||||||
// Run the Streamer.bot action if there is one
|
// Run the Streamer.bot action if there is one
|
||||||
if (globalShowAction) {
|
if (globalShowAction) {
|
||||||
console.debug('Running Streamer.bot action: ' + globalShowAction);
|
console.debug('Running Streamer.bot action: ' + globalShowAction);
|
||||||
@@ -1259,7 +1269,8 @@ function UpdateAlertBox(platform, avatarURL, headerText, descriptionText, attrib
|
|||||||
|
|
||||||
if (message && showMesesages) {
|
if (message && showMesesages) {
|
||||||
|
|
||||||
theContentThatShowsLastInsteadOfFirst.style.display = 'inline-block';
|
//theContentThatShowsLastInsteadOfFirst.style.display = 'inline-block';
|
||||||
|
theContentThatShowsLastInsteadOfFirst.style.visibility = 'visible';
|
||||||
alertBox.style.height = theContentThatShowsLastInsteadOfFirst.offsetHeight + "px";
|
alertBox.style.height = theContentThatShowsLastInsteadOfFirst.offsetHeight + "px";
|
||||||
theContentThatShowsLastInsteadOfFirst.style.opacity = 1;
|
theContentThatShowsLastInsteadOfFirst.style.opacity = 1;
|
||||||
|
|
||||||
@@ -1276,7 +1287,8 @@ function UpdateAlertBox(platform, avatarURL, headerText, descriptionText, attrib
|
|||||||
alertBox.style.height = '0px';
|
alertBox.style.height = '0px';
|
||||||
theContentThatShowsFirstInsteadOfSecond.style.opacity = 1;
|
theContentThatShowsFirstInsteadOfSecond.style.opacity = 1;
|
||||||
theContentThatShowsLastInsteadOfFirst.style.opacity = 0;
|
theContentThatShowsLastInsteadOfFirst.style.opacity = 0;
|
||||||
theContentThatShowsLastInsteadOfFirst.style.display = 'none';
|
//theContentThatShowsLastInsteadOfFirst.style.display = 'none';
|
||||||
|
theContentThatShowsLastInsteadOfFirst.style.visibility = 'hidden';
|
||||||
widgetLocked = false;
|
widgetLocked = false;
|
||||||
if (alertQueue.length > 0) {
|
if (alertQueue.length > 0) {
|
||||||
console.debug("Pulling next alert from the queue");
|
console.debug("Pulling next alert from the queue");
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ html {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
transition: inherit;
|
transition: inherit;
|
||||||
display: none;
|
/* display: none; */
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user