1
1
window . addEventListener ( 'message' , ( event ) => {
2
2
if ( event . data . action == 'notify' ) {
3
- notification ( event . data . title , event . data . message , event . data . type , event . data . time ) ;
3
+ notification ( event . data . title , event . data . message , event . data . info , event . data . time ) ;
4
4
}
5
5
} )
6
6
@@ -45,7 +45,7 @@ const replaceColors = (str, obj) => {
45
45
var sound = new Audio ( 'notification.mp3' ) ;
46
46
sound . volume = 0.25 ;
47
47
48
- notification = ( title , message , type , time ) => {
48
+ notification = ( title , message , info , time ) => {
49
49
for ( color in colors ) {
50
50
if ( message . includes ( color ) ) {
51
51
let obj = { } ;
@@ -58,13 +58,13 @@ notification = (title, message, type, time) => {
58
58
}
59
59
60
60
const notification = $ ( `
61
- <div class="notify-div wrapper" style="border-left: 0.5vh solid ${ colours [ type ] } ; ">
62
- <div class="notify-icon-box" style="border: 0.2vh solid ${ colours [ type ] } ;">
63
- <i class="${ icons [ type ] } fa-ms notify-icon" style="color: ${ colours [ type ] } "></i>
61
+ <div class="notify-div wrapper" style="border-left: 0.5vh solid ${ colours [ info ] } ; ">
62
+ <div class="notify-icon-box" style="border: 0.2vh solid ${ colours [ info ] } ;">
63
+ <i class="${ icons [ info ] } fa-ms notify-icon" style="color: ${ colours [ info ] } "></i>
64
64
</div>
65
65
66
66
<div class="notify-text-box">
67
- <p style="color:${ colours [ type ] } ; font-size: 2vh; font-weight: 500; margin-bottom: 0vh; margin-top: 1vh;">${ title } </p>
67
+ <p style="color:${ colours [ info ] } ; font-size: 2vh; font-weight: 500; margin-bottom: 0vh; margin-top: 1vh;">${ title } </p>
68
68
<p style="margin-top: 0; color: rgba(247, 247, 247, 0.75);">${ message } </p>
69
69
</div>
70
70
</div>
0 commit comments