您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Bing Chat dark mode! Auto align Bing Chat to center!
// ==UserScript== // @name Bing Chat Dark Mode // @namespace https://greasyfork.org/en/scripts/462516 // @author CGYYIT // @license MIT // @version 0.2 // @description Bing Chat dark mode! Auto align Bing Chat to center! // @match https://www.bing.com/search?* // @icon https://www.google.com/s2/favicons?sz=64&domain=bing.com // @grant none // @run-at document-end // ==/UserScript== (function() { let timer = null; let cibSerp = document.getElementsByTagName("cib-serp"); let cibSerpCount = 0; const maxCibSerpCount = 2; // bing chat on the chat tab, and right side of search result let maxRetryCount = 25; function delay(interval = 200) { if (timer) { clearTimeout(timer); timer = null; } timer = setTimeout(() => { maxRetryCount--; console.log(cibSerp.length); if (cibSerp.length > 0 && cibSerpCount < maxCibSerpCount && cibSerpCount < cibSerp.length) { for (let i = cibSerpCount; i < cibSerp.length; i++) { cibSerp[i].design.colorScheme=1; cibSerp[i].alignment="center"; } cibSerpCount = cibSerp.length; } if (cibSerpCount < maxCibSerpCount && maxRetryCount > 0) delay(); }, interval); } delay(); })();