Gist Compact View

Add custom styles to Sergi0's Gist pages

目前為 2025-03-13 提交的版本,檢視 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Gist Compact View
// @namespace    http://tampermonkey.net/
// @version      1
// @description  Add custom styles to Sergi0's Gist pages
// @author       Sergi0
// @match        https://gist.github.com/*
// @grant        GM_addStyle
// @icon         https://gist.github.com/favicon.ico
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';
    GM_addStyle(`
         /* main container */
        .gist-snippet {margin-bottom:2px!important;}
         /* icon */
        #gist-pjax-container > div > div > div.col-9.col-md-9.col-12 > div > div.gist-snippet-meta.d-flex.flex-lg-row.flex-column.width-full > div > div.d-lg-inline-block.d-none.v-align-top.mt-1 > a{display:none!important;}
        /* code */
        .gist-snippet .js-gist-file-update-container.js-task-list-container {display: none;}
        /* links */
        #gist-pjax-container > div > div > div.col-9.col-md-9.col-12 > div > div.gist-snippet-meta.d-flex.flex-lg-row.flex-column.width-full > div > div.d-inline-block.px-lg-2.px-0 > span:nth-child(1){display:none;}
        /* date */
        #gist-pjax-container > div > div > div.col-9.col-md-9.col-12 > div > div.gist-snippet-meta.d-flex.flex-lg-row.flex-column.width-full > div > div.d-inline-block.px-lg-2.px-0 > div {display:none}
        /* font size */
        #gist-pjax-container > div > div > div.col-9.col-md-9.col-12 > div > div.gist-snippet-meta.d-flex.flex-lg-row.flex-column.width-full > div > div.d-inline-block.px-lg-2.px-0 > span.f6.color-fg-muted{font-size:14px!important;}
    `);
})();