Support for clicking on notification
This commit is contained in:
@@ -340,6 +340,9 @@ class channel{
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
getHTML(){
|
getHTML(){
|
||||||
|
if(this.owner!==this.owner.owner.lookingguild){
|
||||||
|
this.owner.loadGuild();
|
||||||
|
}
|
||||||
this.owner.prevchannel=this;
|
this.owner.prevchannel=this;
|
||||||
this.owner.owner.channelfocus=this.id;
|
this.owner.owner.channelfocus=this.id;
|
||||||
this.putmessages();
|
this.putmessages();
|
||||||
@@ -532,6 +535,10 @@ class channel{
|
|||||||
icon:message.author.getpfpsrc(),
|
icon:message.author.getpfpsrc(),
|
||||||
image:imgurl,
|
image:imgurl,
|
||||||
});
|
});
|
||||||
|
notification.addEventListener("click",_=>{
|
||||||
|
window.focus();
|
||||||
|
this.getHTML();
|
||||||
|
})
|
||||||
} else if (Notification.permission !== "denied") {
|
} else if (Notification.permission !== "denied") {
|
||||||
Notification.requestPermission().then((permission) => {
|
Notification.requestPermission().then((permission) => {
|
||||||
this.notify(message);
|
this.notify(message);
|
||||||
|
Reference in New Issue
Block a user