newbing输入框样式固定

将newbing输入框样式固定下来,不变来变去

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         newbing输入框样式固定
// @namespace    http://tampermonkey.net/
// @version      0.4
// @description  将newbing输入框样式固定下来,不变来变去
// @author       You
// @match        https://www.bing.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=bing.com
// @grant        GM_addStyle
// @license MIT
// ==/UserScript==

(function() {
    'use strict';
    let myVar = setInterval(() => {
    const container = document.querySelector('.cib-serp-main');
    if(container){
        let shadowRoot = container.shadowRoot;
        let myElement1 = shadowRoot.getElementById('cib-action-bar-main');
        if(myElement1){
            let shadowRoot2 = myElement1.shadowRoot;
            let myElement2 = shadowRoot2.querySelector('.main-container');
            myElement2.style.minHeight = '90px';
            myElement2.style.borderRadius = '12px';
            let buttonCompose = shadowRoot2.querySelector('.button-compose');
            buttonCompose.style.width= '45px'
            let buttonBar = shadowRoot2.querySelector('.bottom-bar');
            buttonBar.style.opacity=1;
            clearInterval(myVar);
        }
    }
    }, 1000);
})();