diff --git a/en/searchurl/bingAI/bing.html b/en/searchurl/bingAI/bing.html index 42b16b5..efa05fc 100644 --- a/en/searchurl/bingAI/bing.html +++ b/en/searchurl/bingAI/bing.html @@ -17,7 +17,7 @@
- +
diff --git a/en/searchurl/bingAI/js/bing.js b/en/searchurl/bingAI/js/bing.js index d3195d4..fc4791c 100644 --- a/en/searchurl/bingAI/js/bing.js +++ b/en/searchurl/bingAI/js/bing.js @@ -7,6 +7,11 @@ var send_button = document.getElementById('send'); let restartNewChat = document.getElementById('restartNewChat'); var thisChatType = chatTypes.balance; +//全局变量 +var talk; +var returnMessage; +var isSpeaking = false; + reSetStartChatMessage(); //(string) @@ -49,7 +54,6 @@ function onMessage(json, returnMessage) { onMessageIsOKClose = true; returnMessage.getCatWebSocket().close(1000, 'ok'); } else { - talk = undefined; localStorage.removeItem('LastChatJson'); if (json.type == 1) { porserArguments(json.arguments); @@ -78,13 +82,6 @@ input_text.addEventListener('keydown', (event) => { } }); - -//全局变量 -var talk; -var returnMessage; -var isSpeaking = false; - - /**重置聊天框和聊天建议到初始状态 */ function reSetStartChatMessage(type) { createChat(thisChatType).then((r) => { @@ -298,5 +295,14 @@ restartNewChat.onclick = async () => { restart_button.onclick(); } - +async function searchSuggestionsAddOnclick(){ + let adds = document.querySelectorAll("#SearchSuggestions>a"); + for(let add in adds){ + adds[add].onclick = (event)=>{ + if(searchSuggestions.style.opacity>=1){ + send(event.target.innerHTML); + } + } + } +} diff --git a/en/searchurl/bingAI/js/parserReturn.js b/en/searchurl/bingAI/js/parserReturn.js index c3ed46b..05b4af4 100644 --- a/en/searchurl/bingAI/js/parserReturn.js +++ b/en/searchurl/bingAI/js/parserReturn.js @@ -196,29 +196,38 @@ function generateContentQueryImg(message, father){ theUrls.append('SFX', '2'); theUrls.append('q', message.text); theUrls.append('iframeid', message.requestId); - let theUrl = URLTrue(magicUrl,"AiDraw/Create?") + theUrls.toString(); + let theUrl = URLTrue(magicUrl,"images/create?") + theUrls.toString(); try{ father.innerHTML = `正在生成${message.text}的图片.`; let html = (await (await fetch(theUrl)).text()); - let urr = new RegExp('"/(images/create/async/results/(\\S*))"').exec(html); - if(!urr || !urr[1]){ - urr = new RegExp('class="gil_err_mt">([^<>]*)').exec(html); - if(urr || urr[1]){ - father.innerHTML = `${urr[1]}` - return; + + //如果有错误就输出错误 + let urr = new RegExp('class="gil_err_mt">([^<>]*)').exec(html); + if(urr && urr[1]){ + father.innerHTML = `

${urr[1]}

` + urr = new RegExp('class="gil_err_sbt">(([^<>]*<(a|div)[^<>]*>[^<>]*[^<>]*)*)').exec(html); + if(urr && urr[1]){ + father.innerHTML = father.innerHTML+`

${urr[1]}

`; } + return; + } + + //如果没错误就匹配链接获取图片 + urr = new RegExp('"/(images/create/async/results/(\\S*))"').exec(html); + if(!urr || !urr[1]){ console.log(html); addError("请求图片返回不正确的页面,无法加载图片。"); return; } let ur = urr[1]; + ur = ur.replaceAll('&','&'); let imgPageHtmlUrl = URLTrue(magicUrl,ur); let count = 0; let run = async ()=>{ father.innerHTML = `正在生成${message.text}的图片.${count}`; if(count>20){ - addError("请求图片超时!"); + father.innerHTML = "请求图片超时!"; return; } count++; @@ -232,22 +241,29 @@ function generateContentQueryImg(message, father){ setTimeout(run,3000); return; } - let div = document.createElement("div"); - div.innerHTML = imgPageHtml; - let imgs = div.getElementsByTagName("img"); + + father.innerHTML = ''; let theUrls = new URLSearchParams(); theUrls.append('createmessage',message.text); - father.innerHTML = ''; - for(let el=0;el{ - window.open('chrome-extension://'+chrome.runtime.id+'/GeneratePicture/img.html?'+theUrls.toString(), '_blank'); - } - father.appendChild(img); + let a = document.createElement("a"); + father.appendChild(a); + //用正则找全部图片 + let allSrc = imgPageHtml.matchAll(/]*src="([^"]*)"[^<>]*>/g); + let src = undefined; + let ok = false; + while(!(src=allSrc.next()).done){ + ok =true; + theUrls.append('imgs',src.value[1].split('?')[0]); + let img = document.createElement("img"); + img.src = src.value[1]; + a.appendChild(img); + } + if(ok){ + a.target = '_blank'; + a.href = '../GeneratePicture/img.html?'+theUrls.toString(); + }else{ + father.innerHTML = "服务器未正常返回图片!"; } - div.remove(); } setTimeout(run,3000); @@ -396,11 +412,7 @@ function porserSuggestedResponses(suggestedResponses) { for (let i = 0; i < suggestedResponses.length; i++) { let a = document.createElement('a'); a.innerHTML = suggestedResponses[i].text; - a.onclick = (even) => { - if(searchSuggestions.style.opacity>=1){ - send(even.target.innerHTML); - } - } searchSuggestions.appendChild(a); } + searchSuggestionsAddOnclick(); } \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index dd463dd..d7d8f78 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -11,7 +11,7 @@ zh/sitemap.xml - 2023-04-19T23:06:34+08:00 + 2023-04-22T18:03:41+08:00 diff --git a/zh/index.xml b/zh/index.xml index 2fe444f..6904817 100644 --- a/zh/index.xml +++ b/zh/index.xml @@ -157,7 +157,6 @@ UA为非默认时,点击PC按钮将恢复UA为默认,同时触发不保存UA /zh/search/ 超微浏览器下点击搜索引擎配置链接可自动添加到主屏。 推荐引擎(将下面文本添加到home5.search中): -bingChat:i:92X-Forwarded-For;8.8.8.8;User-Agent;Mobile Safari EdgA/111.0.1624.80:https://www.bing.com/search?q= 顺序:i:40%s_00 apkdl:https://apkdl.in/app/search?q= apkbog:https://www.apkbog.com/en/apks/search/ @@ -194,8 +193,6 @@ toplinks:https://www.toplinks.cc/s/?keyword= google:https://google.com/search?q= 谷歌:https://谷歌.ml/search?q= 必应:https://www.bing.com/search?q= -bingUS:i:92X-Forwarded-For;8.8.8.8:https://www.bing.com/search?q= -简单搜索:i:92User-Agent;SearchCraft:https://m.baidu.com/s?wd= 百度:https://m.baidu.com/s?wd= Fsou:https://fsoufsou.com/search?q= neeva:https://neeva.com/search?q= @@ -219,7 +216,12 @@ libvio:https://libvio.me/search/-------------.html?wd= 努努影院:https://www.nunuyy.top/so/%s---.html louk:https://www.louk.cn/vodsearch/-------------.html?wd= 4444影视:http://k.4444.li/search.php?searchword= -nfmovies:https://www.nfmovies.com/search.php?searchword= +nfmovies:https://www.nfmovies.com/search.php?searchword= +电影狗:https://www.dianyinggou.com/so/ +pianku:https://www.pianku.la/search/%s-------------.html +novip:https://www.novipnoad.com/s= +555dianying:https://555dianying.cc/vodsearch/-------------.html?wd= +zhenbuka:https://www.zhenbuka.net/search/-------------.html?wd= diff --git a/zh/search/index.html b/zh/search/index.html index 114be9c..8af4588 100644 --- a/zh/search/index.html +++ b/zh/search/index.html @@ -49,7 +49,6 @@

超微浏览器下点击搜索引擎配置链接可自动添加到主屏。

推荐引擎(将下面文本添加到home5.search中):

-

bingChat:i:92X-Forwarded-For;8.8.8.8;User-Agent;Mobile Safari EdgA/111.0.1624.80:https://www.bing.com/search?q=

顺序:i:40%s_00

apkdl:https://apkdl.in/app/search?q=

apkbog:https://www.apkbog.com/en/apks/search/

@@ -91,8 +90,6 @@ google:https://google.com/search?q=

谷歌:https://谷歌.ml/search?q=

必应:https://www.bing.com/search?q=

-

bingUS:i:92X-Forwarded-For;8.8.8.8:https://www.bing.com/search?q=

-

简单搜索:i:92User-Agent;SearchCraft:https://m.baidu.com/s?wd=

百度:https://m.baidu.com/s?wd=

Fsou:https://fsoufsou.com/search?q=

neeva:https://neeva.com/search?q=

@@ -302,8 +299,8 @@ 有哪些特殊的搜索引擎

-

Last Modified: 13 March 2023
-add newbing tips
+

Last Modified: 22 April 2023
+fix bingAI always 1/20 issue


 

diff --git a/zh/sitemap.xml b/zh/sitemap.xml index 95540d3..de49d55 100644 --- a/zh/sitemap.xml +++ b/zh/sitemap.xml @@ -29,7 +29,7 @@ /> /zh/ - 2023-04-19T23:06:34+08:00 + 2023-04-22T18:03:41+08:00 /zh/topposts/ - 2023-03-13T10:49:42+08:00 + 2023-04-22T18:03:41+08:00 /zh/search/ - 2023-03-13T10:49:42+08:00 + 2023-04-22T18:03:41+08:00 /zh/search/ 超微浏览器下点击搜索引擎配置链接可自动添加到主屏。 推荐引擎(将下面文本添加到home5.search中): -bingChat:i:92X-Forwarded-For;8.8.8.8;User-Agent;Mobile Safari EdgA/111.0.1624.80:https://www.bing.com/search?q= 顺序:i:40%s_00 apkdl:https://apkdl.in/app/search?q= apkbog:https://www.apkbog.com/en/apks/search/ @@ -51,8 +50,6 @@ toplinks:https://www.toplinks.cc/s/?keyword= google:https://google.com/search?q= 谷歌:https://谷歌.ml/search?q= 必应:https://www.bing.com/search?q= -bingUS:i:92X-Forwarded-For;8.8.8.8:https://www.bing.com/search?q= -简单搜索:i:92User-Agent;SearchCraft:https://m.baidu.com/s?wd= 百度:https://m.baidu.com/s?wd= Fsou:https://fsoufsou.com/search?q= neeva:https://neeva.com/search?q= @@ -76,7 +73,12 @@ libvio:https://libvio.me/search/-------------.html?wd= 努努影院:https://www.nunuyy.top/so/%s---.html louk:https://www.louk.cn/vodsearch/-------------.html?wd= 4444影视:http://k.4444.li/search.php?searchword= -nfmovies:https://www.nfmovies.com/search.php?searchword= +nfmovies:https://www.nfmovies.com/search.php?searchword= +电影狗:https://www.dianyinggou.com/so/ +pianku:https://www.pianku.la/search/%s-------------.html +novip:https://www.novipnoad.com/s= +555dianying:https://555dianying.cc/vodsearch/-------------.html?wd= +zhenbuka:https://www.zhenbuka.net/search/-------------.html?wd=