Skip to content

Commit

Permalink
Update notif.js
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasVaillant authored Mar 12, 2022
1 parent cc36a0f commit 029ac3a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions notif.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@ const n = new Notification()

// Passing Arguments here
let textVar = args.plainTexts.toString()
let args_0 = textVar.split(",")[0]
let args_1 = textVar.split(",")[1]

n.title = "Emploi du temps 📚"
n.subtitle = ""

// Avoid error for passed args
if(textVar === null || textVar === undefined || textVar === ""){
if(args_1 === null || args_1 === undefined || args_1 === ""){
n.title = textVar
n.body = "Aucun résultat"
}else{
n.body = textVar.split(",")[1]
n.title = args_0
n.body = args_1
}

n.threadIdentifier = "Emploi du temps"
Expand Down

0 comments on commit 029ac3a

Please sign in to comment.