Various small fixes based on real-world usage
This commit is contained in:
parent
79fd27ce58
commit
d331594225
@ -158,7 +158,7 @@ Accessing 3rd party libraries
|
|||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Immediately inside the module shown above you can access 3rd party libraries (such
|
Immediately inside the module shown above you can access 3rd party libraries (such
|
||||||
moment, underscore and jQuery) via the ``converse.env`` map.
|
moment and lodash) via the ``converse.env`` map.
|
||||||
|
|
||||||
The code for it would look something like this:
|
The code for it would look something like this:
|
||||||
|
|
||||||
@ -172,8 +172,7 @@ The code for it would look something like this:
|
|||||||
$msg = converse.env.$msg,
|
$msg = converse.env.$msg,
|
||||||
$pres = converse.env.$pres,
|
$pres = converse.env.$pres,
|
||||||
$build = converse.env.$build,
|
$build = converse.env.$build,
|
||||||
b64_sha1 = converse.env.b64_sha1;
|
b64_sha1 = converse.env.b64_sha1,
|
||||||
$ = converse.env.jQuery,
|
|
||||||
_ = converse.env._,
|
_ = converse.env._,
|
||||||
moment = converse.env.moment;
|
moment = converse.env.moment;
|
||||||
|
|
||||||
@ -362,8 +361,7 @@ generated by `generator-conversejs <https://github.com/jcbrand/generator-convers
|
|||||||
$msg = converse.env.$msg,
|
$msg = converse.env.$msg,
|
||||||
$pres = converse.env.$pres,
|
$pres = converse.env.$pres,
|
||||||
$build = converse.env.$build,
|
$build = converse.env.$build,
|
||||||
b64_sha1 = converse.env.b64_sha1;
|
b64_sha1 = converse.env.b64_sha1,
|
||||||
$ = converse.env.jQuery,
|
|
||||||
_ = converse.env._,
|
_ = converse.env._,
|
||||||
moment = converse.env.moment;
|
moment = converse.env.moment;
|
||||||
|
|
||||||
@ -397,8 +395,7 @@ generated by `generator-conversejs <https://github.com/jcbrand/generator-convers
|
|||||||
|
|
||||||
/* From the `_converse` object you can get any configuration
|
/* From the `_converse` object you can get any configuration
|
||||||
* options that the user might have passed in via
|
* options that the user might have passed in via
|
||||||
* `converse.initialize`. These values are stored in the
|
* `converse.initialize`.
|
||||||
* "user_settings" attribute.
|
|
||||||
*
|
*
|
||||||
* You can also specify new configuration settings for this
|
* You can also specify new configuration settings for this
|
||||||
* plugin, or override the default values of existing
|
* plugin, or override the default values of existing
|
||||||
@ -415,11 +412,8 @@ generated by `generator-conversejs <https://github.com/jcbrand/generator-convers
|
|||||||
* converse.initialize({
|
* converse.initialize({
|
||||||
* "initialize_message": "My plugin has been initialized"
|
* "initialize_message": "My plugin has been initialized"
|
||||||
* });
|
* });
|
||||||
*
|
|
||||||
* And the configuration setting is then available via the
|
|
||||||
* `user_settings` attribute:
|
|
||||||
*/
|
*/
|
||||||
alert(this._converse.user_settings.initialize_message);
|
alert(this._converse.initialize_message);
|
||||||
|
|
||||||
/* Besides `_converse.api.settings.update`, there is also a
|
/* Besides `_converse.api.settings.update`, there is also a
|
||||||
* `_converse.api.promises.add` method, which allows you to
|
* `_converse.api.promises.add` method, which allows you to
|
||||||
|
Loading…
Reference in New Issue
Block a user