add option to fetch settings from external API

This commit is contained in:
Sharon Kennedy
2020-10-20 18:38:38 -04:00
parent ee30b14cba
commit de4106c093
7 changed files with 100 additions and 15930 deletions

View File

@@ -13,20 +13,8 @@
<script src="./chatbox.js"></script>
<script>
var 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',
position: 'bottom right',
size: 'large',
maxWaitTime: 1000*60*3, // 3 minutes
}
settingsEndpoint: 'https://safesupport-admin.herokuapp.com/api/get-settings'
}
EmbeddableChatbox.mount(config);
</script>