Skip to content

Commit

Permalink
chore: small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
surunzi committed Oct 12, 2023
1 parent 0c499d4 commit 8a1a087
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"style-loader": "^3.3.1",
"terser": "^5.10.0",
"ts-loader": "^9.3.1",
"typescript": "^3.8.3",
"typescript": "^5.2.2",
"webpack": "^5.73.0",
"webpack-cli": "^4.10.0",
"xml2js": "^0.4.23"
Expand Down
2 changes: 1 addition & 1 deletion server/lib/WebSocketServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ module.exports = class WebSocketServer {
ws.title = q.title;
ws.favicon = q.favicon;
ws.userAgent = q.userAgent;
ws.rtc = q.rtc === 'true'
ws.rtc = q.rtc === 'true';
} else {
ws.target = q.target;
}
Expand Down
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ function inspect(id: string, rtc: boolean) {
const protocol = location.protocol === 'https:' ? 'wss' : 'ws';
const url =
location.protocol +
`//${domain}${basePath}front_end/chii_app.html?${protocol}=${encodeURIComponent(`${domain}${basePath}client/${randomId(6)}?target=${id}`)}&rtc=${rtc}`;
`//${domain}${basePath}front_end/chii_app.html?${protocol}=${encodeURIComponent(
`${domain}${basePath}client/${randomId(6)}?target=${id}`
)}&rtc=${rtc}`;
window.open(url, '_blank');
}

Expand Down
2 changes: 1 addition & 1 deletion src/target.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import connectIframe from './target/connectIframe';

if (!embedded) {
if (rtc) {
connectRtc()
connectRtc();
} else {
connectServer();
}
Expand Down
2 changes: 1 addition & 1 deletion test/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function injectTarget() {
script.setAttribute('embedded', 'true');
}
if (location.href.indexOf('rtc=true') > -1) {
script.setAttribute('rtc', 'true')
script.setAttribute('rtc', 'true');
}
if (location.href.indexOf('cdn=true') > -1) {
script.setAttribute('cdn', 'https://cdn.jsdelivr.net/npm/chii/public');
Expand Down

0 comments on commit 8a1a087

Please sign in to comment.