Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jsxc/jsxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsualko <klaus@jsxc.org>2021-08-25 12:50:25 +0300
committersualko <klaus@jsxc.org>2021-08-25 13:19:21 +0300
commit2d36908bc77aa9f43bc1ea0efa54200c1002cb93 (patch)
treeda8bad52abe01c4e0eba35e36004af159d794a20 /example
parentca76d15b64de1daf94f8d1d83df7ac098d9bd098 (diff)
chore: fix demo script
Diffstat (limited to 'example')
-rw-r--r--example/js/helper.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/example/js/helper.js b/example/js/helper.js
index ccd04e01..2cd3d6bd 100644
--- a/example/js/helper.js
+++ b/example/js/helper.js
@@ -9,10 +9,15 @@ if (window.location.hostname === 'localhost') {
}
// special setup for jsxc.org/example
-if (window.location.hostname === 'www.jsxc.org') {
+if (window.location.hostname === 'www.jsxc.org' || window.location.hostname === 'jsxc.org') {
if (!localStorage.getItem('bosh-url') && !localStorage.getItem('xmpp-domain')) {
$('#bosh-url').val('/http-bind/');
$('#xmpp-domain').val('demo.jsxc.ch');
+
+ const demoUser = 'demo' + Math.round(Math.random() * 9);
+
+ $('[name="username"]').val(demoUser);
+ $('[name="password"]').val(demoUser);
}
$('.jsxc-org').show();