Skip to content

Commit 029ac3a

Browse files
Update notif.js
1 parent cc36a0f commit 029ac3a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

notif.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@ const n = new Notification()
22

33
// Passing Arguments here
44
let textVar = args.plainTexts.toString()
5+
let args_0 = textVar.split(",")[0]
6+
let args_1 = textVar.split(",")[1]
57

6-
n.title = "Emploi du temps 📚"
78
n.subtitle = ""
89

9-
// Avoid error for passed args
10-
if(textVar === null || textVar === undefined || textVar === ""){
10+
if(args_1 === null || args_1 === undefined || args_1 === ""){
11+
n.title = textVar
1112
n.body = "Aucun résultat"
1213
}else{
13-
n.body = textVar.split(",")[1]
14+
n.title = args_0
15+
n.body = args_1
1416
}
1517

1618
n.threadIdentifier = "Emploi du temps"

0 commit comments

Comments
 (0)