ocrcc-chatbox/src/outputs/bookmarklet.js

26 lines
858 B
JavaScript
Raw Normal View History

2020-02-23 23:12:47 -05:00
import EmbeddableChatbox from './embeddable-chatbox';
2018-06-03 16:01:32 -04:00
2020-05-06 19:46:59 -04:00
const config = {
matrixServerUrl: 'https://matrix.rhok.space',
botId: '@help-bot:rhok.space',
roomName: 'Support Chat',
termsUrl: 'https://tosdr.org/',
introMessage: 'This chat application does not collect any of your personal data or any data from your use of this service.',
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-03-15 00:47:19 -04:00
2018-06-09 09:13:49 -04:00
export default function bookmarklet() {
2020-02-23 23:12:47 -05:00
if (window.EmbeddableChatbox) {
return;
}
2020-02-23 23:12:47 -05:00
window.EmbeddableChatbox = EmbeddableChatbox;
EmbeddableChatbox.mount(config);
2018-06-09 09:13:49 -04:00
}
bookmarklet();