Hi all,
Well this is my first time writing a plugin which involves using client side hooks...
For a start, i would want my plugin to listen to a hook which activates when the topic page is completely loaded and topic tools are loaded too.
For which I wrote this function:
'use strict';
/* globals document, $ */
$(document).ready(function () {
function alertType(type, message) {
require(['alerts'], function (alerts) {
alerts[type](message);
});
}
console.log('nodebb-plugin-quickstart: loaded');
$(window).on('action:topic.loaded', notifyBox);
function notifyBox() {
console.log("in notify box");
alertType('success', "done")
}
});
but this is not working... I can only see "nodebb-plugin-quickstart: loaded" on the console.
Where am i going wrong here??