Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Chatterbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
element-hq
Chatterbox
Commits
e74aeb00
Commit
e74aeb00
authored
3 years ago
by
Half-Shot
Committed by
Midhun Suresh
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Namespace CONFIG_LOCATION to CHATTERBOX_CONFIG_LOCATION
parent
a77b65d8
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+1
-1
1 addition, 1 deletion
README.md
index.html
+1
-1
1 addition, 1 deletion
index.html
src/parent.ts
+2
-2
2 additions, 2 deletions
src/parent.ts
with
4 additions
and
4 deletions
README.md
+
1
−
1
View file @
e74aeb00
...
...
@@ -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>
```
This diff is collapsed.
Click to expand it.
index.html
+
1
−
1
View file @
e74aeb00
...
...
@@ -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>
...
...
This diff is collapsed.
Click to expand it.
src/parent.ts
+
2
−
2
View file @
e74aeb00
...
...
@@ -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
"
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment