From 891ca45bf037de43c5ea203d4f4b4428059d2b9c Mon Sep 17 00:00:00 2001 From: jeena Date: Thu, 18 Apr 2013 08:59:22 -0700 Subject: [PATCH] Updated Plugins (markdown) --- Plugins.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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; ``` ***