diff --git a/Plugins.md b/Plugins.md index 8643d25..d05563c 100644 --- a/Plugins.md +++ b/Plugins.md @@ -24,9 +24,19 @@ The paths for the plugins on Linux are more confortable: You can use the embedded jQuery too. +If you are using more then one plug-in then you can save them in different files (within the same directory as `Plugin.js`) and use [require.js](http://requirejs.org/) to load them from within the `Plugin.js` file (you need to prepend the path with `plugins/`): +```js +require( [ + 'plugins/hide-replies', + 'plugins/scroll-lock', + 'plugins/marked-post' + ], function() {} +); +``` + Plugins can get the JSON representation of a post through the `status` property of its `li` tag. ``` js -document.getElementById('post-'+post_id).status; +document.getElementById('post-' + post_id + '-timeline').status; ``` ***