summaryrefslogtreecommitdiff
path: root/kartik/views/script/core_notification.js
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-05-18 18:50:12 +0200
committerMinteck <contact@minteck.org>2022-05-18 18:50:12 +0200
commit0bd45cb2cae3af05adaad3f38d129bb67c3e0ec0 (patch)
tree97a7e15187fe7fcb5b8775e03a62f62ac8fc5c61 /kartik/views/script/core_notification.js
parentd4805039b8ea7b30f5e78cf53caf8fd3f267256a (diff)
downloadarcade-trunk.tar.gz
arcade-trunk.tar.bz2
arcade-trunk.zip
Add KartikHEADtrunk
Diffstat (limited to 'kartik/views/script/core_notification.js')
-rwxr-xr-xkartik/views/script/core_notification.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/kartik/views/script/core_notification.js b/kartik/views/script/core_notification.js
new file mode 100755
index 0000000..e720006
--- /dev/null
+++ b/kartik/views/script/core_notification.js
@@ -0,0 +1,12 @@
+global.notification = (data) => {
+ document.getElementById("notification-title").innerText = data.title;
+ document.getElementById("notification-message").innerText = data.message;
+ document.getElementById("notification").style.right = "20px";
+ document.getElementById("notification").style.opacity = "1";
+ new Audio("./sfx/notification.mp3").play();
+
+ setTimeout(() => {
+ document.getElementById("notification").style.right = "-300px";
+ document.getElementById("notification").style.opacity = "0";
+ }, 5000)
+}; \ No newline at end of file