shout icon indicating copy to clipboard operation
shout copied to clipboard

Client plugins

Open janza opened this issue 10 years ago • 4 comments

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); }
})

janza avatar Dec 28 '14 00:12 janza

Whoa, really cool, does this mean users can add their own plugins?

ctian1 avatar Dec 28 '14 01:12 ctian1

Yes, I've added some basic hooks for plugins. There should probably be more, but this works for a start (text replacement for example).

janza avatar Dec 28 '14 11:12 janza

AMAZEBALLS! Thank you.

spencerthayer avatar Dec 28 '14 18:12 spencerthayer

@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.

AlMcKinlay avatar Jan 24 '16 17:01 AlMcKinlay