mirror of
https://github.com/torappinfo/uweb.git
synced 2024-08-14 23:54:59 +00:00
refine bingAI UI
This commit is contained in:
parent
25bb54f62c
commit
b01672cb48
10 changed files with 50 additions and 20 deletions
|
@ -97,7 +97,7 @@
|
|||
|
||||
</div>
|
||||
<p>Last Modified: 1 April 2023<br>
|
||||
fix <a> tag with href & onclick for README<br>
|
||||
add bingAI UI<br>
|
||||
<pre></pre>
|
||||
</p>
|
||||
|
||||
|
|
|
@ -74,6 +74,13 @@
|
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/4.3.0/marked.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.4/katex.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.4/contrib/auto-render.min.js"></script>
|
||||
<script>
|
||||
async function getMagicUrl() {
|
||||
let v = localStorage.GoGoUrl;
|
||||
if(v) return v;
|
||||
return "https://mybing2.xn--xyza.top/";
|
||||
}
|
||||
</script>
|
||||
<script src="./js/GetSet.js"></script>
|
||||
<script src="./js/ChatMessages.js"></script>
|
||||
<script src="./js/bingChatHub.js"></script>
|
||||
|
|
|
@ -2,12 +2,6 @@ async function setMagicUrl(url) {
|
|||
localStorage.setItem('GoGoUrl',url);
|
||||
}
|
||||
|
||||
async function getMagicUrl() {
|
||||
let v = localStorage.GoGoUrl;
|
||||
if(v) return v;
|
||||
return "https://mybing2.xn--xyza.top/";
|
||||
}
|
||||
|
||||
// ture:开启使用魔法聊天|false:关闭使用魔法聊天|'repeat':开启聊天复用
|
||||
async function setChatHubWithMagic(user) {
|
||||
localStorage.setItem('ChatHubWithMagic',user);
|
||||
|
|
|
@ -44,11 +44,15 @@ var throttling = {
|
|||
function porserType2Item(item){
|
||||
let chatDiv = document.getElementById('chat');
|
||||
if(item.result){
|
||||
if(item.result.value=='Success'){
|
||||
let result = item.result;
|
||||
if(result.value=='Success'){
|
||||
|
||||
}else if (item.result.value == 'Throttled') {
|
||||
addError(item.result.message);
|
||||
}else if (result.value == 'Throttled') {
|
||||
addError(result.message);
|
||||
addError('24消息请求数达到了限制!');
|
||||
}else{
|
||||
addError(result.message);
|
||||
addError('发生未知错误!');
|
||||
}
|
||||
}
|
||||
if (item.throttling) {
|
||||
|
@ -112,9 +116,16 @@ function porserMessages(messages, father) {
|
|||
}else if (message.messageType == 'RenderCardRequest'){//渲染卡片请求,目前不知道有什么用
|
||||
renderCardRequest(message, father);
|
||||
|
||||
}else if(message.messageType == 'Disengaged'){
|
||||
let div = getByID(message.messageId, 'div', chat, 'error');
|
||||
div.innerHTML = `
|
||||
${message.hiddenText}<br>聊天中断!试试开始新主题?
|
||||
`;
|
||||
|
||||
}else if(message.contentOrigin == 'TurnLimiter'){
|
||||
addError(message.text);
|
||||
addError('聊天被限制了,试试开始新主题?');
|
||||
|
||||
} else {
|
||||
console.log('发现一个另类message', JSON.stringify(message));
|
||||
}
|
||||
|
@ -232,7 +243,7 @@ function generateContentQueryImg(message, father){
|
|||
img.src = imgs[el].src;
|
||||
theUrls.append('imgs',img.src.split('?')[0]);
|
||||
img.onclick = ()=>{
|
||||
window.open('GeneratePicture/img.html?'+theUrls.toString(), '_blank');
|
||||
window.open('chrome-extension://'+chrome.runtime.id+'/GeneratePicture/img.html?'+theUrls.toString(), '_blank');
|
||||
}
|
||||
father.appendChild(img);
|
||||
}
|
||||
|
@ -392,4 +403,4 @@ function porserSuggestedResponses(suggestedResponses) {
|
|||
}
|
||||
searchSuggestions.appendChild(a);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -11,7 +11,7 @@
|
|||
<sitemap>
|
||||
<loc>zh/sitemap.xml</loc>
|
||||
|
||||
<lastmod>2023-04-01T23:39:33+08:00</lastmod>
|
||||
<lastmod>2023-04-02T09:50:29+08:00</lastmod>
|
||||
|
||||
</sitemap>
|
||||
|
||||
|
|
|
@ -13,7 +13,13 @@
|
|||
|
||||
<guid>/zh/tips/</guid>
|
||||
<description>免魔法直接使用newbing (chatgpt)
|
||||
总要求:长按底部&quot;PC&quot;按钮选择user-agent为&quot;edge&quot;
|
||||
方法1: bingChat自带魔法直接界面
|
||||
要求: 安装界面html
|
||||
勾选选项“使用离线缓存”
|
||||
复制bing.com cookies至魔法域名
|
||||
点击界面入口
|
||||
可配置魔法url, 详情
|
||||
方法2: 可以采用超级书签/直接界面+脚本+hosts。
|
||||
其中超级书签固定bingchat入口。
|
||||
脚本重定向api至魔法师.
|
||||
|
|
|
@ -13,7 +13,13 @@
|
|||
|
||||
<guid>/zh/tips/</guid>
|
||||
<description>免魔法直接使用newbing (chatgpt)
|
||||
总要求:长按底部&quot;PC&quot;按钮选择user-agent为&quot;edge&quot;
|
||||
方法1: bingChat自带魔法直接界面
|
||||
要求: 安装界面html
|
||||
勾选选项“使用离线缓存”
|
||||
复制bing.com cookies至魔法域名
|
||||
点击界面入口
|
||||
可配置魔法url, 详情
|
||||
方法2: 可以采用超级书签/直接界面+脚本+hosts。
|
||||
其中超级书签固定bingchat入口。
|
||||
脚本重定向api至魔法师.
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
|
||||
</div>
|
||||
<p>Last Modified: 1 April 2023<br>
|
||||
fix <a> tag with href & onclick for README<br>
|
||||
add bingAI UI<br>
|
||||
<pre></pre>
|
||||
</p>
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
<url>
|
||||
<loc>/zh/_posts/</loc>
|
||||
<lastmod>2023-04-01T20:51:06+08:00</lastmod>
|
||||
<lastmod>2023-04-02T09:50:29+08:00</lastmod>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="en"
|
||||
|
@ -16,7 +16,7 @@
|
|||
/>
|
||||
</url><url>
|
||||
<loc>/zh/</loc>
|
||||
<lastmod>2023-04-01T23:39:33+08:00</lastmod>
|
||||
<lastmod>2023-04-02T09:50:29+08:00</lastmod>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="en"
|
||||
|
@ -29,7 +29,7 @@
|
|||
/>
|
||||
</url><url>
|
||||
<loc>/zh/tips/</loc>
|
||||
<lastmod>2023-04-01T20:51:06+08:00</lastmod>
|
||||
<lastmod>2023-04-02T09:50:29+08:00</lastmod>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="en"
|
||||
|
|
|
@ -47,10 +47,16 @@
|
|||
<ul class="tags">
|
||||
|
||||
</ul>
|
||||
<p><strong>免魔法直接使用newbing (chatgpt)</strong></p>
|
||||
<p><strong>免魔法直接使用newbing (chatgpt)</strong><br>
|
||||
总要求:长按底部"PC"按钮选择user-agent为"edge"</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>方法1: <a href="../../en/offlinecache/index.html">bingChat自带魔法直接界面</a></p>
|
||||
<p>方法1: <a href="../../en/offlinecache/index.html">bingChat自带魔法直接界面</a><br>
|
||||
要求: 安装界面html<br>
|
||||
勾选选项“使用离线缓存”<br>
|
||||
复制bing.com cookies至魔法域名<br>
|
||||
点击界面入口<br>
|
||||
可配置魔法url, <a href="https://gitee.com/jja8/NewBingGoGo/blob/master/docs/%E5%88%9B%E5%BB%BA%E8%87%AA%E5%B7%B1%E7%9A%84%E9%AD%94%E6%B3%95%E9%93%BE%E6%8E%A5.md">详情</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>方法2: 可以采用超级书签/直接界面+脚本+hosts。<br>
|
||||
|
@ -78,7 +84,7 @@ UA为非默认时,点击PC按钮将恢复UA为默认,同时触发不保存UA
|
|||
<a href="../filenames">配置文件列表</a>中直接点击文件名即可编辑。</p>
|
||||
|
||||
</div>
|
||||
<p>Last Modified: 1 April 2023<br>
|
||||
<p>Last Modified: 2 April 2023<br>
|
||||
add bingAI UI<br>
|
||||
<pre></pre>
|
||||
</p>
|
||||
|
|
Loading…
Reference in a new issue