Skip to content

Commit

Permalink
[js] Remove notifier function
Browse files Browse the repository at this point in the history
  • Loading branch information
uw0s committed Mar 8, 2024
1 parent 7fc61e4 commit 992ca13
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions python/static/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -1009,35 +1009,4 @@ function resetGUIElements() {
Remove.disabled = false;
ClassText.disabled = false;
SubmitClasses.disabled = false;
}

function showNotification(type, text, duration) {
clearTimeout(notificationTimeout);
notificationText.textContent = text;
switch (type) {
case "success":
notificationIcon.textContent = "✔️";
notificationMessage.style.backgroundColor = "green";
notificationMessage.style.color = "white";
break;
case "info":
notificationIcon.textContent = "ℹ️";
notificationMessage.style.backgroundColor = "lightblue";
notificationMessage.style.color = "black";
break;
case "failure":
notificationIcon.textContent = "❌";
notificationMessage.style.backgroundColor = "red";
notificationMessage.style.color = "white";
break;
default:
notificationIcon.textContent = "";
notificationMessage.style.backgroundColor = "grey";
notificationMessage.style.color = "black";
break;
}
notificationMessage.style.display = "flex";
notificationTimeout = setTimeout(function() {
notificationMessage.style.display = "none";
}, duration);
}

0 comments on commit 992ca13

Please sign in to comment.