mirror of
https://github.com/friendica/friendica
synced 2025-04-25 10:30:12 +00:00
Fix browser prefetch in notifications menu
Fix browser prefetch by substituting data-src with src for images
This commit is contained in:
parent
94c8d7693f
commit
dbf8f711cf
27 changed files with 44 additions and 26 deletions
10
js/main.js
10
js/main.js
|
@ -181,7 +181,14 @@
|
|||
html = notifications_tpl.format(e.attr('href'),e.attr('photo'), text, e.attr('date'), e.attr('seen'));
|
||||
nnm.append(html);
|
||||
});
|
||||
|
||||
$("img[data-src]", nnm).each(function(i, el){
|
||||
// Replace data-src attribute with src attribute for every image
|
||||
$(el).attr('src', $(el).data("src"));
|
||||
$(el).removeAttr("data-src");
|
||||
});
|
||||
}
|
||||
|
||||
notif = eNotif.attr('count');
|
||||
if (notif>0){
|
||||
$("#nav-notifications-linkmenu").addClass("on");
|
||||
|
@ -202,8 +209,7 @@
|
|||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
NavUpdate();
|
||||
// Allow folks to stop the ajax page updates with the pause/break key
|
||||
$(document).keydown(function(event) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue