That should work but I added a helper to make this easier. https://github.com/NodeBB/nodebb-plugin-composer-default/commit/7c15eeb85b6d702e0a4a3f6519e03af0208c3342
You can all this from your hook
$(document).ready(function() { $(window).on('action:ajaxify.end', function(ev, data) { require(['composer'], function(composer) { composer.minimizeActive(); }); }); });