Using PushJS libary to use Push Notifications, when I add link
option
A relative URL path to navigate to when the user clicks on the notification on mobile (e.g. if you want users to navigate to your page http://example.com/page, then the relative URL is just page). If the page is already open in the background, then the browser window will automatically become focused. Requires the serviceWorker.js file to be present on your server to work.
Does not work when clicking.
const showButton = document.querySelector(".show-button");
showButton.onclick = function() {
Push.create("Notion TIIIIME!!", {
body: "Dá uma olhada nas suas obrigações lá o Notion!",
icon: "",
timeout: 5000,
requireInteraction: true,
link:"https://www.notion.so/",
onClick: function() {
console.log(this);
}
});
};