Alright, I placed the code that @cpradio suggested in a CSS/HTML Customization page under the tab, but unfortunately it doesn’t seem to be working. Just to prove the concept, I have it try to display an alert. Below is the exact code I am using:
<script type="text/discourse-plugin">
import { withPluginApi } from 'discourse/lib/plugin-api';
function initializePlugin(api)
{
api.onPageChange((url, title) => {
alert('test');
});
}
export default {
name: 'align-category-text',
initialize: function(container)
{
withPluginApi('0.1', api => initializePlugin(api));
}
};
</script>
I made sure the code was enabled and tried restarting rails. Any thoughts on what I’m missing?