]> git.mxchange.org Git - friendica.git/blobdiff - js/main.js
after pull 1460 all notifications got marked read
[friendica.git] / js / main.js
index 5f4b56f4d856ec0793f5502fc31d6ec4cb03e6e7..d7381c96a474e47671f01bcdb727000be8a6b233 100644 (file)
                                        text = e.text().format("<span class='contactname'>"+e.attr('name')+"</span>");
                                        html = notifications_tpl.format(e.attr('href'),e.attr('photo'), text, e.attr('date'), e.attr('seen'));
                                        nnm.append(html);
+                                       
+                                       if(e.text().search('&rarr;') == 0) {
+                                         var notification = new Notification(document.title, {
+                                          body: e.text().replace('&rarr; ',''),
+                                          icon: e.attr('photo')
+                                         });
+   
+                                         // TODO (yet unsupported by most browsers): 
+                                         // Implement notification.onclick()
+                                         
+                                         // notifyMarkAll();
+                                       }
                                });
 
                                $("img[data-src]", nnm).each(function(i, el){