Discord Keyword Notification -updated

Displays a windows notification whenever a user mentions specific textual word(s) in a channel. The script must be manually edited to configure the keywords.

ผู้เขียน
noxtrip
จำนวนติดตั้งประจำวัน
0
จำนวนติดตั้งทั้งหมด
145
คะแนน
2 0 0
เวอร์ชัน
1.0.0
สร้างเมื่อ
05-08-2022
อัปเดตเมื่อ
05-08-2022
สัญญาอนุญาต
GNU AGPLv3
ปรับใช้กับ

With my limited knowladge of web dev I just altered original script (https://greasyfork.org/en/scripts/373445-discord-keyword-notification/code) by jcunews to make it work as it was not working for me.

Do not try to ask me to update it i just spend two hours to make it work and be done with it.

Important notes:
-I tested in on Chrome and Edge browsers. Notifications did not work on firefox.
-Sometimes script doesnt seem to initialize properly. Best way to make sure it works is to open the URL to discord channel you want to monitor directly in browser
-There is no timeout on notification. Probably can be added i dont care.
-Windows notification are displayed. No idea if other OS will work.
-You define what words are you looking for here: var keywordsRegexp = /leech|snip/gi;
-in this example notification will be sent if string leech OR snip will be found in a message. /gi means that search is case insensitive
-if i would like to search only for "january" it should look like this keywordsRegexp = /january/gi;
-if i would like to search for "jan" "feb" "march" then keywordsRegexp = /jan|feb|march/gi;
-see tutorials for regexp if need more sofisticated things for me simple match word was enough