mirror of
https://github.com/torappinfo/uweb.git
synced 2024-08-14 23:54:59 +00:00
fix typos
This commit is contained in:
parent
74511d89e0
commit
2ac6107614
3 changed files with 20 additions and 14 deletions
|
@ -48,13 +48,17 @@ function onMessage(json, returnMessage) {
|
||||||
if (json.type == 3) {
|
if (json.type == 3) {
|
||||||
onMessageIsOKClose = true;
|
onMessageIsOKClose = true;
|
||||||
returnMessage.getCatWebSocket().close(1000, 'ok');
|
returnMessage.getCatWebSocket().close(1000, 'ok');
|
||||||
} else if (json.type == 1) {
|
|
||||||
porserArguments(json.arguments);
|
|
||||||
} else if (json.type == 2) {
|
|
||||||
porserType2Item(json.item);
|
|
||||||
} else {
|
} else {
|
||||||
console.log(JSON.stringify(json));
|
talk = undefined;
|
||||||
}
|
localStorage.removeItem('LastChatJson');
|
||||||
|
if (json.type == 1) {
|
||||||
|
porserArguments(json.arguments);
|
||||||
|
} else if (json.type == 2) {
|
||||||
|
porserType2Item(json.item);
|
||||||
|
} else {
|
||||||
|
console.log(JSON.stringify(json));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -289,7 +293,7 @@ input_update_input_text_sstyle_show_update({ target: input_text });
|
||||||
|
|
||||||
//开始新聊天按钮逻辑,仅在聊天复用
|
//开始新聊天按钮逻辑,仅在聊天复用
|
||||||
restartNewChat.onclick = async () => {
|
restartNewChat.onclick = async () => {
|
||||||
await setLastChatJson(null);
|
localStorage.removeItem('LastChatJson');
|
||||||
await setLastInvocationId(1);
|
await setLastInvocationId(1);
|
||||||
restart_button.onclick();
|
restart_button.onclick();
|
||||||
}
|
}
|
||||||
|
|
|
@ -348,7 +348,7 @@ class Chat {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function URLTrue(magicUrl, thiePath) {
|
function URLTrue(url, thiePath) {
|
||||||
return url + thiePath;
|
return url + thiePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -367,9 +367,10 @@ async function copyCookies(magicUrl) {}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
async function createChat(theChatType) {
|
async function createChat(theChatType) {
|
||||||
let chatWithMagic = await getChatHubWithMagic();
|
let chatWithMagic = await getChatHubWithMagic();
|
||||||
let magicUrl = await getMagicUrl();
|
let magicUrl = await getMagicUrl();
|
||||||
let restartNewChat = document.getElementById('restartNewChat');
|
let restartNewChat = document.getElementById('restartNewChat');
|
||||||
|
|
||||||
if(chatWithMagic=='repeat'){//如果是聊天复用
|
if(chatWithMagic=='repeat'){//如果是聊天复用
|
||||||
restartNewChat.classList.remove('onShow');
|
restartNewChat.classList.remove('onShow');
|
||||||
let resjson = await getLastChatJson();
|
let resjson = await getLastChatJson();
|
||||||
|
@ -385,11 +386,12 @@ async function createChat(theChatType) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let mes;
|
let mes;
|
||||||
do {
|
do {
|
||||||
try {
|
try {
|
||||||
let res = await fetch(URLTrue(magicUrl,'turing/conversation/create'),
|
let url = URLTrue(magicUrl,'turing/conversation/create');
|
||||||
{credentials: 'include'});
|
let res = await fetch(url, {credentials: 'include'});
|
||||||
let resjson = await res.json();
|
let resjson = await res.json();
|
||||||
if (!resjson.result || resjson.result.value != 'Success') {
|
if (!resjson.result || resjson.result.value != 'Success') {
|
||||||
mes = resjson;
|
mes = resjson;
|
||||||
|
|
|
@ -57,7 +57,7 @@ body>ul{padding-left:0;}
|
||||||
<li><label><input type="checkbox" onchange="location.href='i:2516777216'"/>Block dubious resources when blocking external scripts</label></li>
|
<li><label><input type="checkbox" onchange="location.href='i:2516777216'"/>Block dubious resources when blocking external scripts</label></li>
|
||||||
<li><label><input type="checkbox" onchange="location.href='i:2533554432'"/>Use termux</label></li>
|
<li><label><input type="checkbox" onchange="location.href='i:2533554432'"/>Use termux</label></li>
|
||||||
<li><label><input type="checkbox" onchange="location.href='i:2567108864'"/>webview debug</label></li>
|
<li><label><input type="checkbox" onchange="location.href='i:2567108864'"/>webview debug</label></li>
|
||||||
<li><label><input type="checkbox" onchange="location.href='i:25134217728'"/>fullscreen playing w/o ligntness & volumn gestures</label></li>
|
<li><label><input type="checkbox" onchange="location.href='i:25134217728'"/>fullscreen playing w/o brightness & volumn gestures</label></li>
|
||||||
</ul>
|
</ul>
|
||||||
<script>
|
<script>
|
||||||
checkBoxes=document.getElementsByTagName("input");
|
checkBoxes=document.getElementsByTagName("input");
|
||||||
|
|
Loading…
Reference in a new issue