Skip to content
Snippets Groups Projects
Commit e74aeb00 authored by Half-Shot's avatar Half-Shot Committed by Midhun Suresh
Browse files

Namespace CONFIG_LOCATION to CHATTERBOX_CONFIG_LOCATION

parent a77b65d8
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,7 @@ Follow the develop instructions above (steps 1-3), then:
Assuming that the build output (inside `/target`) is hosted at `<root>` (eg: chatterbox.element.io), copy and paste the following snippet before the closing `</body>` tag:
```html
<script>
window.CONFIG_LOCATION = "path_to_config";
window.CHATTERBOX_CONFIG_LOCATION = "path_to_config";
</script>
<script src="<root>/parent/assets/parent.js" type="module" id="chatterbox-script"></script>
```
......@@ -34,7 +34,7 @@
</div>
</div>
<script>
window.CONFIG_LOCATION = "./config.json";
window.CHATTERBOX_CONFIG_LOCATION = "./config.json";
</script>
<script src="./src/parent.ts" type="module" id="chatterbox-script"></script>
</body>
......
......@@ -52,9 +52,9 @@ function loadCSS() {
function loadChatterboxIframe() {
const iframe = document.createElement("iframe");
const configLocation = (window as any).CONFIG_LOCATION;
const configLocation = (window as any).CHATTERBOX_CONFIG_LOCATION;
if (!configLocation) {
throw new Error("CONFIG_LOCATION is not set");
throw new Error("CHATTERBOX_CONFIG_LOCATION is not set");
}
iframe.src = new URL("../chatterbox.html?config=" + configLocation, hostRoot).href;
iframe.className = "chatterbox-iframe";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment