new Bing 样式美化

让newbing的界面更人性化

  1. // ==UserScript==
  2. // @name new Bing 样式美化
  3. // @namespace https://www.bing.com/
  4. // @version 0.3
  5. // @description 让newbing的界面更人性化
  6. // @author You
  7. // @match *://www.bing.com/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
  9. // @grant none
  10. // @license GPLv3
  11. // ==/UserScript==
  12.  
  13. (function () {
  14. 'use strict';
  15. setInterval(() => {
  16. if (document.getElementsByTagName("cib-serp").length > 0) {
  17. const pops = document.getElementsByTagName("cib-serp")[0].shadowRoot.getRootNode().getElementById("cib-conversation-main").shadowRoot.getRootNode().getElementById("cib-chat-main").children
  18. // console.log("pops", pops)
  19. for (let pop of pops) {
  20. if (pop.tagName === "CIB-CHAT-TURN") {
  21. const children = pop.shadowRoot.getRootNode().children
  22. for (let child of children) {
  23. if (child.tagName === "CIB-MESSAGE-GROUP") {
  24. if (child.getAttribute("source") === "user") {
  25. const textBlock = child.shadowRoot.getRootNode().children[0].shadowRoot.getRootNode().children[0].children[0]
  26. textBlock.style.whiteSpace = "break-spaces"
  27. } else {
  28. const blocks = child.shadowRoot.getRootNode().children
  29. for (let block of blocks) {
  30. if (block.getAttribute("type") === "text") {
  31. for (let messageBolck of block.shadowRoot.getRootNode().children) {
  32. if (messageBolck.tagName === "CIB-SHARED") {
  33. const textBlock = messageBolck.children[0]
  34. textBlock.style.whiteSpace = "break-spaces"
  35. const sups = textBlock.getElementsByTagName("sup")
  36. for (let sup of sups) {
  37. sup.style.userSelect = "none"
  38. }
  39. }
  40.  
  41. }
  42. }
  43. }
  44. }
  45. }
  46. }
  47. }
  48. }
  49. }
  50. }, 1000);
  51. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址