Chat Mfweb Beautify

为 chat.mfweb.top 提供美化样式的脚本

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Chat Mfweb Beautify
// @namespace    https://gist.github.com/Nyaasu66/9cfffb9431b4e5440f4b92a0ae9ef4bd
// @version      0.1.3
// @description  为 chat.mfweb.top 提供美化样式的脚本
// @author       Nyaasu66
// @match        https://chat.mfweb.top/
// @icon         https://www.google.com/s2/favicons?sz=64&domain=mfweb.top
// @grant        none
// @license     MIT
// ==/UserScript==

(function () {
  "use strict";
  // add some style to class css-1i6ejgd
  const style = document.createElement("style");
  style.innerHTML = `
  .MuiTypography-root.MuiTypography-body2.MuiTypography-noWrap.MuiListItemText-primary,
  .MuiTypography-root.MuiTypography-body2.MuiListItemText-secondary {
      font-size: 12px;
    }
    .MuiCard-root {
      transform: scale(0.85);
    }
    .MuiToolbar-root.MuiToolbar-gutters.MuiToolbar-regular {
      min-height: 40px;
    }
    .MuiDrawer-root > .MuiDrawer-paper {
      margin-top: 40px;
      height: calc(100% - 40px);
    }
    header.MuiPaper-root {
      background-color: #202123;
    }
    .MuiList-root::-webkit-scrollbar-thumb {
      background-color: #ececf1;
      border-radius: 30px;
    }
    .MuiList-root::-webkit-scrollbar-track {
      background-color: transparent;
    }
    #root > .MuiStack-root > .MuiDrawer-docked > .MuiPaper-root > .MuiList-root {
      overflow: hidden;
    }
    .MuiStack-root {
      font-size: 14px;
    }
    .MuiFormControl-root.MuiFormControl-fullWidth {
      width: 60%;
      margin: 0 auto;
    }
  `;
  document.head.appendChild(style);

  window.onload = function () {
    document.querySelector(".MuiTypography-h6").innerHTML = "ChatGPT";
    const elem = document.querySelector(".MuiList-root");
    elem.addEventListener("mouseenter", () => {
      elem.style.overflow = "auto";
    });
    elem.addEventListener("mouseleave", () => {
      elem.style.overflow = "hidden";
    });

    document.title = "ChatGPT";
  };
})();