shout
shout copied to clipboard
Client plugins
Support for loading additional scripts on frontend. Added basic hooks for plugins to client script.
Scripts can be added to ~/.shout/plugins directory.
Registering a plugin:
shoutPlugins.push({
onmessage: function(message) { console.log(message); },
onprerender: function(name, data) { console.log(data); },
onppostrender: function(name, html) { console.log(html); }
})
Whoa, really cool, does this mean users can add their own plugins?
Yes, I've added some basic hooks for plugins. There should probably be more, but this works for a start (text replacement for example).
AMAZEBALLS! Thank you.
@astorije Would this work as a base for the package system? It might have quite a few merge conflicts because it has been over a year, but might be worth starting if @janza is worth updating it? It looks like this was never looked at.