safesupport-chatbox/index.html

38 lines
1.7 KiB
HTML
Raw Normal View History

2020-02-01 17:38:48 +00:00
<!DOCTYPE html>
<html>
<head>
<title>Embeddable Chatbox Demo</title>
2020-02-17 17:23:26 +00:00
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1">
2020-02-01 17:38:48 +00:00
</head>
2020-02-26 01:22:09 +00:00
<body style="height: 100vh;">
2020-02-16 23:32:24 +00:00
<p style="font-family:sans-serif; padding: 3rem 5rem;">
<a id="bookmarklet">Bookmarklet (drag it to your bookmarks bar)</a>
</p>
2020-02-01 17:38:48 +00:00
<p style="font-family:sans-serif; padding: 3rem 5rem;">Look down!</p>
2020-02-24 04:13:35 +00:00
<script src="./chatbox.js"></script>
2020-02-01 17:38:48 +00:00
<script>
2020-03-12 17:11:27 +00:00
var config = {
2020-04-30 14:19:26 +00:00
matrixServerUrl: 'https://matrix.safesupport.chat',
botId: '@help-bot:safesupport.chat',
2020-03-12 17:11:27 +00:00
roomName: 'Support Chat',
termsUrl: 'https://tosdr.org/',
2020-04-30 14:19:26 +00:00
introMessage: "This is just a demo! There is probably no-one at the other end. You should probaby email us instead. But if you're lucky, there might be someone online to say hi!",
2020-03-12 17:11:27 +00:00
agreementMessage: 'Do you want to continue?',
confirmationMessage: 'Waiting for a facilitator to join the chat...',
exitMessage: 'The chat is closed. You may close this window.',
chatUnavailableMessage: 'The chat service is not available right now. Please try again later.',
anonymousDisplayName: 'Anonymous',
2020-04-30 14:19:26 +00:00
}
2020-02-05 18:43:10 +00:00
2020-03-12 17:11:27 +00:00
EmbeddableChatbox.mount(config);
2020-02-01 17:38:48 +00:00
</script>
2020-02-16 23:32:24 +00:00
<script>
var bookmarklet = "var s= document.createElement('script'); s.setAttribute('src', '"+window.location.href+"bookmarklet.js'); s.setAttribute('crossorigin', 'anonymous'); document.body.appendChild(s);"
bookmarklet = '(function(){'+ bookmarklet +'})();'
document.querySelector('a#bookmarklet').setAttribute("href", "javascript:" + encodeURIComponent(bookmarklet));
</script>
2020-02-01 17:38:48 +00:00
</body>
</html>