Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Client plugins #320

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Client plugins #320

wants to merge 3 commits into from

Conversation

janza
Copy link
Contributor

@janza janza commented Dec 28, 2014

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

@ctian1
Copy link
Contributor

ctian1 commented Dec 28, 2014

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

@ibizaman ibizaman mentioned this pull request Dec 28, 2014
@janza
Copy link
Contributor Author

janza commented Dec 28, 2014

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 janza mentioned this pull request Dec 28, 2014
@spencerthayer
Copy link

AMAZEBALLS! Thank you.

@AlMcKinlay
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants