Chat Mfweb Beautify

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

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==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";
  };
})();