diff options
author | sualko <klaus@jsxc.org> | 2021-08-25 12:50:25 +0300 |
---|---|---|
committer | sualko <klaus@jsxc.org> | 2021-08-25 13:19:21 +0300 |
commit | 2d36908bc77aa9f43bc1ea0efa54200c1002cb93 (patch) | |
tree | da8bad52abe01c4e0eba35e36004af159d794a20 /example | |
parent | ca76d15b64de1daf94f8d1d83df7ac098d9bd098 (diff) |
chore: fix demo script
Diffstat (limited to 'example')
-rw-r--r-- | example/js/helper.js | 7 |
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(); |