GM_notification({onclick:}) malfunction

Post Reply
Mattwmaster58
Posts: 2
Joined: 07.05.17 04:24:31

GM_notification({onclick:}) malfunction

Post by Mattwmaster58 » 12.05.17 00:05:49

1.) UserAgent: (please keep this as it is)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36

Tampermonkey Beta, 4.3.5447

Steps to reproduce the problem:
Problem occurs when using GM_notification. To recreate, simply make a user script that includes the following code

Code: Select all

GM_notification({text: "hello", title: "world", onclick: function(){console.log("hey")});
The console.log statement is fired immediately after the notification appears

garden
Posts: 1
Joined: 13.05.17 00:41:53

Re: GM_notification({onclick:}) malfunction

Post by garden » 13.05.17 00:44:50

Adding a missing bracket seemed to fix this:

Code: Select all

GM_notification({
    text: "hello",
    title: "world",
    onclick: function(){ console.log("hey"); }
});

Mattwmaster58
Posts: 2
Joined: 07.05.17 04:24:31

Re: GM_notification({onclick:}) malfunction

Post by Mattwmaster58 » 13.05.17 01:13:21

I've simplified the post above so it is easier to read. I've double checked my formatting and all seems good. What could be the problem?

Post Reply