adams549659584 / go-proxy-bingai

用 Vue3 和 Go 搭建的微软 New Bing 演示站点,拥有一致的 UI 体验,支持 ChatGPT 提示词,国内可用。
MIT License
8.87k stars 12.82k forks source link

Where is the insertion of <cib-serp> node ? #217

Open zhangzhuang15 opened 1 year ago

zhangzhuang15 commented 1 year ago

I take a try in https://bing.vcanbb.top/web/#/, it feels great.

I find that there is a node in this website, but I cannot find where create this node in index.html of source code.I'm really curious about this, are there some magic tricks in the source code ?

Any response will be Appreciated!

houtarchat-cyber commented 12 months ago

Actually, the node itself is inserted by the JavaScript provided by Microsoft Bing. Go frontend/public/js/bing/chat/core.js and you will find that six JS files are imported, which makes the node inserted.

zhangzhuang15 commented 12 months ago

Actually, the node itself is inserted by the JavaScript provided by Microsoft Bing. Go frontend/public/js/bing/chat/core.js and you will find that six JS files are imported, which makes the node inserted.

Thanks a lot🎉. I find out the codes following your reply.This question confuses me for a long time.

By the way, I'm not sure how the author writes core.js, there're no related comments in core.js talking about the code refer. I guess that author might copy the new Bing website codes to core.js. Do you have some thoughts ? @houtarchat-cyber

houtarchat-cyber commented 11 months ago

Thanks a lottada. I find out the codes following your reply.This question confuses me for a long time.

By the way, I'm not sure how the author writes core.js, there're no related comments in core.js talking about the code refer. I guess that author might copy the new Bing website codes to core.js. Do you have some thoughts ? @houtarchat-cyber

I don't know what the author exactly did, but I did find some code on the search page on the new Bing website, which I'm pasting below (formatted):

//<![CDATA[
// ... part omitted here ...
sa_loader = function () {
  _w.rms.js({
    "rms:answers:AutoSuggest:AutoSug": "/rp/i8UiC_YzHCbgvHqe5aHFdOJTemU.br.js",
    d: 1
  });
};
_w.rms.js(
  {
    "A:0": 0
  },
  {
    "A:rms:answers:Shared:BingCore.Bundle":
      "/rp/Pki1-YEXD6vos5MiDyyAeDq7sgs.br.js"
  },
  {
    // ... part omitted here ...
  },
  {
    "A:23": 23
  }
); //]]>

The author may have modified these codes manually, but I have no way of knowing.

Sincerely hope these can help you.

zhangzhuang15 commented 11 months ago

Anyway, Thanks @houtarchat-cyber