mirror of
https://github.com/friendica/friendica
synced 2025-04-19 06:30:10 +00:00
Rewrite JS hooks
- Use event listeners instead of homebrew hooks - Remove view/js/addon-hooks.js and its references - Update Addon docs
This commit is contained in:
parent
68c6895e1a
commit
7dd6fb3b3c
5 changed files with 8 additions and 59 deletions
|
@ -478,14 +478,12 @@ function liveUpdate(src) {
|
|||
$('.wall-item-body', data).imagesLoaded(function() {
|
||||
updateConvItems(data);
|
||||
|
||||
document.dispatchEvent(new Event('postprocess_liveupdate'));
|
||||
|
||||
// Update the scroll position.
|
||||
$(window).scrollTop($(window).scrollTop() + $("section").height() - orgHeight);
|
||||
});
|
||||
|
||||
callAddonHooks("postprocess_liveupdate");
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function imgbright(node) {
|
||||
|
@ -735,6 +733,8 @@ function loadScrollContent() {
|
|||
} else {
|
||||
$("#scroll-end").fadeIn('normal');
|
||||
}
|
||||
|
||||
document.dispatchEvent(new Event('postprocess_liveupdate'));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue