Commit c26dde34 authored by JC Brand's avatar JC Brand

Allow setting of debug mode via URL with `/#converse?debug=true`

parent 61a0e1bb
......@@ -2,6 +2,7 @@
## 4.1.3 (Unreleased)
- Allow setting of debug mode via URL with `/#converse?debug=true`
- New config setting [locked_muc_domain](https://conversejs.org/docs/html/configuration.html#locked-muc-domain)
- New config setting [show_client_info](https://conversejs.org/docs/html/configuration.html#show-client-info)
- #1373: Re-add support for the [muc_domain](https://conversejs.org/docs/html/configuration.html#muc-domain) setting
......
......@@ -63176,6 +63176,14 @@ _converse.initialize = async function (settings, callback) {
throw new Error("Config Error: you need to provide the server's " + "domain via the 'jid' option when using anonymous " + "authentication with auto_login.");
}
}
_converse.router.route(/^converse\?debug=(true|false)$/, 'debug', debug => {
if (debug === "true") {
_converse.debug = true;
} else {
_converse.debug = false;
}
});
/* Localisation */
......@@ -588,7 +588,10 @@ debug
* Default: ``false``
If set to true, debugging output will be logged to the browser console.
If set to ``true``, debugging output will be logged to the browser console.
You can also set this value by changing the URL fragment to `#converse?debug=true` or `#converse?debug=false`.
default_domain
--------------
......
......@@ -495,6 +495,14 @@ _converse.initialize = async function (settings, callback) {
}
}
_converse.router.route(/^converse\?debug=(true|false)$/, 'debug', debug => {
if (debug === "true") {
_converse.debug = true;
} else {
_converse.debug = false;
}
});
/* Localisation */
if (!_.isUndefined(i18n)) {
i18n.setLocales(settings.i18n, _converse);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment