|
@@ -339,6 +339,60 @@ For example::
|
|
|
|
|
|
`[{'jid': 'room@example.org', 'nick': 'WizardKing69' }]`
|
|
|
|
|
|
+
|
|
|
+blacklisted_plugins
|
|
|
+-------------------
|
|
|
+
|
|
|
+* Default: ``[]`` (``['converse-minimize', 'converse-dragresize']`` for inVerse)
|
|
|
+
|
|
|
+A list of plugin names that are blacklisted and will therefore not be
|
|
|
+initialized once ``converse.initialize`` is called, even if the same plugin is
|
|
|
+whitelisted.
|
|
|
+
|
|
|
+From Converse.js 3.0 onwards most of the API is available only to plugins and
|
|
|
+all plugins need to be whitelisted first.
|
|
|
+
|
|
|
+The usecase for blacklisting is generally to disable removed core plugins
|
|
|
+(which are automatically whitelisted) to prevent other (potentially malicious)
|
|
|
+plugins from registering themselves under those names.
|
|
|
+
|
|
|
+The core, and by default whitelisted, plugins are::
|
|
|
+
|
|
|
+ converse-bookmarks
|
|
|
+ converse-chatview
|
|
|
+ converse-controlbox
|
|
|
+ converse-core
|
|
|
+ converse-dragresize
|
|
|
+ converse-headline
|
|
|
+ converse-mam
|
|
|
+ converse-minimize
|
|
|
+ converse-muc
|
|
|
+ converse-notification
|
|
|
+ converse-otr
|
|
|
+ converse-ping
|
|
|
+ converse-register
|
|
|
+ converse-rosterview
|
|
|
+ converse-vcard
|
|
|
+
|
|
|
+An example from `the embedded room demo <https://conversejs.org/demo/embedded.html>`_
|
|
|
+
|
|
|
+.. code-block:: javascript
|
|
|
+
|
|
|
+ require(['converse-core', 'converse-muc-embedded'], function (converse) {
|
|
|
+ converse.initialize({
|
|
|
+ // other settings removed for brevity
|
|
|
+ blacklisted_plugins: [
|
|
|
+ 'converse-controlbox',
|
|
|
+ 'converse-dragresize',
|
|
|
+ 'converse-minimize',
|
|
|
+ 'converse-vcard'
|
|
|
+ ],
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
.. _`bosh-service-url`:
|
|
|
|
|
|
bosh_service_url
|
|
@@ -1296,55 +1350,51 @@ support.
|
|
|
.. note::
|
|
|
Converse.js does not yet support "keepalive" with websockets.
|
|
|
|
|
|
-blacklisted_plugins
|
|
|
--------------------
|
|
|
|
|
|
-* Default: ``[]`` (``['converse-minimize', 'converse-dragresize']`` for inVerse)
|
|
|
+view_mode
|
|
|
+---------
|
|
|
|
|
|
-A list of plugin names that are blacklisted and will therefore not be
|
|
|
-initialized once ``converse.initialize`` is called, even if the same plugin is
|
|
|
-whitelisted.
|
|
|
+* Default: ``overlayed``
|
|
|
+* Allowed values: ``overlayed``, ``fullscreen``, ``mobile``
|
|
|
|
|
|
-From Converse.js 3.0 onwards most of the API is available only to plugins and
|
|
|
-all plugins need to be whitelisted first.
|
|
|
+The ``view_mode`` setting configures converse.js's mode and resulting behavior.
|
|
|
|
|
|
-The usecase for blacklisting is generally to disable removed core plugins
|
|
|
-(which are automatically whitelisted) to prevent other (potentially malicious)
|
|
|
-plugins from registering themselves under those names.
|
|
|
+Before the introduction of this setting (in version 3.3.0), there were there
|
|
|
+different builds, each for the diffent modes.
|
|
|
|
|
|
-The core, and by default whitelisted, plugins are::
|
|
|
+These were:
|
|
|
|
|
|
- converse-bookmarks
|
|
|
- converse-chatview
|
|
|
- converse-controlbox
|
|
|
- converse-core
|
|
|
- converse-dragresize
|
|
|
- converse-headline
|
|
|
- converse-mam
|
|
|
- converse-minimize
|
|
|
- converse-muc
|
|
|
- converse-notification
|
|
|
- converse-otr
|
|
|
- converse-ping
|
|
|
- converse-register
|
|
|
- converse-rosterview
|
|
|
- converse-vcard
|
|
|
+* ``converse.js`` for the ``overlayed`` mode
|
|
|
+* ``converse-mobile.js`` for the ``mobile`` mode
|
|
|
+* ``inverse.js`` for the ``fullscreen`` mode
|
|
|
|
|
|
-An example from `the embedded room demo <https://conversejs.org/demo/embedded.html>`_
|
|
|
+Besides having three different builds, certain plugins had to be whitelisted
|
|
|
+and blacklisted for the different modes.
|
|
|
|
|
|
-.. code-block:: javascript
|
|
|
+``converse-singleton`` had to be whitelisted for the ``mobile`` and ``fullscreen``
|
|
|
+modes, additionally ``converse-inverse`` had to be whitelisted for the
|
|
|
+``fullscreen`` mode.
|
|
|
|
|
|
- require(['converse-core', 'converse-muc-embedded'], function (converse) {
|
|
|
- converse.initialize({
|
|
|
- // other settings removed for brevity
|
|
|
- blacklisted_plugins: [
|
|
|
- 'converse-controlbox',
|
|
|
- 'converse-dragresize',
|
|
|
- 'converse-minimize',
|
|
|
- 'converse-vcard'
|
|
|
- ],
|
|
|
- });
|
|
|
- });
|
|
|
+For both those modes the ``converse-minimize`` and ``converse-dragresize``
|
|
|
+plugins had to be blacklisted.
|
|
|
+
|
|
|
+Since version 3.3.0, the last two builds no longer exist, and instead the
|
|
|
+standard ``converse.js`` build is used, together with the appropraite
|
|
|
+``view_mode`` value.
|
|
|
+
|
|
|
+Furthermore, it's no longer necessary to whitelist or blacklist any plugins.
|
|
|
+
|
|
|
+.. note::
|
|
|
+ Although the ``view_mode`` setting has removed the need for different
|
|
|
+ JavaScript builds, you'll still need to use different CSS files depending
|
|
|
+ on the view mode.
|
|
|
+
|
|
|
+ * For ``overlayed`` this is ``./css/converse.css``
|
|
|
+ * For ``fullscreen`` you need ``./css/inverse.css``
|
|
|
+ * For ``mobile`` you need to use both ``./css/converse.css`` and ``./css/mobile.css``
|
|
|
+
|
|
|
+ Hopefully in a future release the CSS files will be combined and you'll
|
|
|
+ only need ``converse.css``
|
|
|
|
|
|
|
|
|
.. _`whitelisted_plugins`:
|