29.01.2018, 08:51
grp.listen has its own store for listeners. If you want to create something custom you will have to create your own implementation. So it might be easier to attach custom events to $(window). As for plan change, there's already a 'showplan' event attached to document.body:
Code:
$(document.body).on('showplan', function(event, id) {
console.log('new plan id is', id);
});