I would like to trigger a function each time a URL is changed. Is there a way to do this within a plugin?
Thanks!
I would like to trigger a function each time a URL is changed. Is there a way to do this within a plugin?
Thanks!
We have this API:
<script type="text/discourse-plugin" version="0.2">
api.onPageChange((url, title) => {
Em.run.next(()=>{
$('body').addClass('xyz')
});
});
</script>