Skip to content

Commit

Permalink
close #29
Browse files Browse the repository at this point in the history
  • Loading branch information
rodber committed Feb 18, 2024
1 parent 4f03c07 commit 9b0300d
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions app/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,7 @@ pushMessage = function (data, isStatus = false) {
setTimeout(function () {
el.remove();
if(data.action === "clear" && document.querySelector("main").childElementCount == 0) {
document.body.classList = "body--splash";
setTimeout(function () {
if(document.querySelector("main").childElementCount != 0) {
document.body.classList = "";
return;
}
document.body.classList.add("body--splash-in");
}, 10)
splash();
}
}, 250)
}, 5000);
Expand All @@ -288,6 +281,19 @@ pushMessage = function (data, isStatus = false) {
}, 250);

}
splash = function () {
if(document.querySelector("main").childElementCount > 0) {
return;
}
document.body.classList = "body--splash";
setTimeout(function () {
if(document.querySelector("main").childElementCount != 0) {
document.body.classList = "";
return;
}
document.body.classList.add("body--splash-in");
}, 10)
}
setStatus(currentStatus);
for (key in keysToAction) {
document
Expand Down Expand Up @@ -339,6 +345,7 @@ document.addEventListener("click", event => {
.add("message--removing");
setTimeout(function () {
messageEl.remove();
splash();
}, 250);
break;
case "copy":
Expand Down

0 comments on commit 9b0300d

Please sign in to comment.