Linux.do 美化

美化 Linux.do

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Linux.do 美化
// @namespace    http://tampermonkey.net/
// @version      2024-07-22
// @description  美化 Linux.do 
// @author       huala
// @match        https://linux.do/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=linux.do
// @grant        GM_addStyle
// ==/UserScript==

(function () {
  "use strict";

  GM_addStyle(`
:root {
  --d-sidebar-background: #ffffff !important;
  --header_background: #ffffff !important;
  --secondary: #ffffff !important;
}

/* WebKit 浏览器(如 Chrome 和 Safari) */
::-webkit-scrollbar {
  width: 12px !important; /* 滚动条的宽度 */
  height: 12px !important; /* 滚动条的高度 */
}

::-webkit-scrollbar-track {
  background: #f1f1f1 !important; /* 滚动条轨道的背景色 */
  border-radius: 6px !important; /* 圆角 */
}

::-webkit-scrollbar-thumb {
  background: #888 !important; /* 滚动条滑块的颜色 */
  border-radius: 6px !important; /* 圆角 */
}

::-webkit-scrollbar-thumb:hover {
  background: #555 !important; /* 鼠标悬停时的颜色 */
}

/* Firefox 浏览器 */
* {
  scrollbar-width: thin !important; /* 滚动条的宽度 */
  scrollbar-color: #888 #f1f1f1 !important; /* 滚动条滑块和轨道的颜色 */
}

*::-webkit-scrollbar-track {
  background: #f1f1f1 !important; /* 滚动条轨道的背景色 */
}

*::-webkit-scrollbar-thumb {
  background-color: #888 !important; /* 滚动条滑块的颜色 */
  border-radius: 6px !important; /* 圆角 */
  border: 3px solid #f1f1f1 !important; /* 给滑块添加边框,使其与轨道间有间距 */
}

#main-outlet-wrapper > div.sidebar-wrapper {
  padding-top: 18px !important;
}

.has-sidebar-page .sidebar-wrapper .sidebar-container {
  box-shadow: rgba(67, 71, 85, 0.27) 0px 0px 0.25em,
    rgba(90, 125, 188, 0.05) 0px 0.25em 1em !important;
  height: 85% !important;
  border: none !important;
}

.main-outlet {
  box-shadow: rgba(67, 71, 85, 0.27) 0px 0px 0.25em,
    rgba(90, 125, 188, 0.05) 0px 0.25em 1em !important;
}

#main-outlet-wrapper > div.sidebar-wrapper {
  padding: 1px;
}

#main-outlet > div.list-controls > div > section.category-heading {
  display: flex !important;
  align-items: center !important;
}

#main-outlet > div.list-controls > div > section.category-heading > div {
  --max-height: 50px !important;
}

  `);
})();