# Overview
The chat demo screen of vchatcloud include functions that communicate with API and operate. These functions can be easily used by using the script file provided by us. Main features include translate, file share, open Graph functions and more. To use this function, read the usage instructions below, You can use it by reading the documentation for library.
# How to use additional libraries
Create a
script.js
file to write the script.First, open the html file of the page you want to use, and then import
e7lib-latest.min
and the just createdscript.js
into the head.
<head>
<!-- ...your code -->
<script src="https://vchatcloud.com/lib/e7lib-latest.min.js"></script>
<script src="./script.js"></script>
</head>
1
2
3
4
5
2
3
4
5
WARNING
Note the import order (put e7lib-latest.min.js
at the top)
- Load libraries to be used at the top of
script.js
.
const { Trans, FileUtil, OpenGraph } = e7lib;
// or
const Trans = e7lib.Trans;
const FileUtil = e7lib.FileUtil;
const OpenGraph = e7lib.OpenGraph;
1
2
3
4
5
2
3
4
5
TIP
If you only want to use a part of the library, you just need to declare the library to be loaded.
const { Trans, OpenGraph } = e7lib;
// or
const Trans = e7lib.Trans;
const OpenGraph = e7lib.OpenGraph;
1
2
3
4
2
3
4
- Write the code by referring to the document related to
script.js
.