mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-22 16:30:34 +01:00
feat: allow hook unregistration, and temporary page-based hooks
Temporary hooks automatically unregister themselves on the next ajaxify, making them perfect for in-page events.
This commit is contained in:
@@ -113,7 +113,9 @@ ajaxify = window.ajaxify || {};
|
||||
url: url,
|
||||
};
|
||||
|
||||
$(window).trigger('action:ajaxify.start', payload);
|
||||
require(['hooks'], function (hooks) {
|
||||
hooks.fire('action:ajaxify.start', payload);
|
||||
});
|
||||
|
||||
ajaxify.count += 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user