Updated Plugins (markdown)
parent
80e941bf3f
commit
891ca45bf0
1 changed files with 11 additions and 1 deletions
12
Plugins.md
12
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;
|
||||
```
|
||||
|
||||
***
|
||||
|
|
Reference in a new issue