|
@@ -64,8 +64,8 @@ Each plugin comes in its own file, and Converse's plugin architecture,
|
|
|
with the ability to "hook in" to the core code and other plugins.
|
|
|
|
|
|
Plugins enable developers to extend and override existing objects,
|
|
|
-functions and the `Backbone <http://backbonejs.org/>`_ models and views that make up
|
|
|
-Converse. You can also create new Backbone (or other) models and views.
|
|
|
+functions and the models and views that make up
|
|
|
+Converse. You can also create new models and views.
|
|
|
|
|
|
.. note:: **Trying out a plugin in JSFiddle**
|
|
|
|
|
@@ -151,7 +151,7 @@ The globally available ``converse`` object, which exposes the API methods, such
|
|
|
as ``initialize`` and ``plugins.add``, is a wrapper that encloses and protects
|
|
|
a sensitive inner object, named ``_converse`` (not the underscore prefix).
|
|
|
|
|
|
-This inner ``_converse`` object contains all the Backbone models and views,
|
|
|
+This inner ``_converse`` object contains all the models and views,
|
|
|
as well as various other attributes and functions.
|
|
|
|
|
|
Within a plugin, you will have access to this internal
|
|
@@ -175,7 +175,7 @@ The code for it could look something like this:
|
|
|
|
|
|
// Commonly used utilities and variables can be found under the "env"
|
|
|
// namespace of the "converse" global.
|
|
|
- const { Backbone, Promise, Strophe, dayjs, sizzle, _, $build, $iq, $msg, $pres } = converse.env;
|
|
|
+ const { Promise, Strophe, dayjs, sizzle, _, $build, $iq, $msg, $pres } = converse.env;
|
|
|
|
|
|
These dependencies are closured so that they don't pollute the global
|
|
|
namespace, that's why you need to access them in such a way inside the module.
|
|
@@ -216,7 +216,7 @@ The following code snippet provides an example of two different overrides:
|
|
|
// Your custom code can come here ...
|
|
|
},
|
|
|
|
|
|
- /* On the XMPPStatus Backbone model is a method sendPresence.
|
|
|
+ /* On the XMPPStatus model is a method sendPresence.
|
|
|
* We can override is as follows:
|
|
|
*/
|
|
|
XMPPStatus: {
|
|
@@ -471,7 +471,7 @@ generated by `generator-conversejs <https://github.com/jcbrand/generator-convers
|
|
|
|
|
|
// Commonly used utilities and variables can be found under the "env"
|
|
|
// namespace of the "converse" global.
|
|
|
- const { Backbone, Promise, Strophe, dayjs, sizzle, _, $build, $iq, $msg, $pres } = converse.env;
|
|
|
+ const { Promise, Strophe, dayjs, sizzle, _, $build, $iq, $msg, $pres } = converse.env;
|
|
|
|
|
|
// The following line registers your plugin.
|
|
|
converse.plugins.add("myplugin", {
|
|
@@ -551,7 +551,7 @@ generated by `generator-conversejs <https://github.com/jcbrand/generator-convers
|
|
|
*/
|
|
|
},
|
|
|
|
|
|
- /* If you want to override some function or a Backbone model or
|
|
|
+ /* If you want to override some function or a model or
|
|
|
* view defined elsewhere in Converse, then you do that under
|
|
|
* the "overrides" namespace.
|
|
|
*/
|
|
@@ -577,7 +577,7 @@ generated by `generator-conversejs <https://github.com/jcbrand/generator-convers
|
|
|
// Your custom code can come here ...
|
|
|
},
|
|
|
|
|
|
- /* Override Converse's XMPPStatus Backbone model so that we can override the
|
|
|
+ /* Override Converse's XMPPStatus model so that we can override the
|
|
|
* function that sends out the presence stanza.
|
|
|
*/
|
|
|
XMPPStatus: {
|