您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Right sidebar at repository page with description and other becomes top row, quite like it used to be before 2020 redesign
当前为
/* ==UserStyle== @name GitHub - single column with important info on the top @namespace myfonj @version 1.1.1 @description Right sidebar at repository page with description and other becomes top row, quite like it used to be before 2020 redesign @author myf ==/UserStyle== */ @-moz-document regexp("^https?://github.com/([^#?/]*?)/([^#?/]*?)/?([#?].*)?$") { /* GitHub - single column with important info on the top https://greasyfork.org/en/scripts/406729/versions/new */ /* unify main max width and centering */ main[id] > div { max-width: none !important; max-width: 80rem !important; margin-left: auto; margin-right: auto; } /* */ main > div:first-child { display: flex; flex-direction: column; background-color: transparent !important; padding-top: 0 !important; } main > div:first-child > nav { order: -1; margin-bottom: 1em; } /* §1 mobile-only description under main repository identifier (heading) above columns wrapper it is duplicated in the second column for large displays, which we will hide later */ main > div > div + div:not(#\0) { display: flex !important; flex-wrap: wrap; } /* actual description at own "line" (THIS IS IT) */ main > div > div + div:not(#\0) > p:first-child { flex-basis: 100% } main > div > div + div:not(#\0) > * { margin-right: 1em; } /* baseline align */ main > div > div + div:not(#\0) > p:first-child + *.d-flex { display: block !important; } /* star / watch (duped at desktop header) */ main > div > div + div:not(#\0) > :last-child { display: none !important; } /* .repository-content = main > div:last-child > div.repository-content "main table" = .repository-content > div > div:first-child "info sidebar" = .repository-content > div > div:last-child > div */ /* main rows-made-columns wrapper */ .repository-content > div { flex-direction: column-reverse !important; } /* now columns */ .repository-content > div > div { width: auto; } /* for god's sake, THIS div should be MAIN and should be near H1 or something not suffocated at the end of the document in sidebar */ .repository-content > div > div:last-child > div { display: flex; flex-direction: row; flex-wrap: wrap; padding-bottom: 1rem; } .repository-content > div > div:last-child > div > * { flex-grow: 1; flex-shrink: 1; } /* no border nor paddings */ .repository-content > div > div:last-child > div > div > div { border: none; padding-top: 0; padding-right: 1rem; padding-bottom: 1rem; } /* "about" cell actually, there is this content near H1, but it is shown only for mobile at this point it is shown (see §1), so let's hide what is already visible in there */ /* - description - dupe from header */ .repository-content > div > div:last-child > div > *:first-child p { display: none; } /* - license - dupe from header */ .repository-content > div > div:last-child > div > *:first-child [href$="/blob/master/LICENSE.txt"] { display: none; } /* - external link - dupe frome header */ .repository-content > div > div:last-child > div > div:first-child > div p + div svg.octicon-link, .repository-content > div > div:last-child > div > div:first-child > div p + div svg.octicon-link + span { display: none; } /* - "About" heading is quite redundant in there not hidden, but cropped and pulling adjacent content up */ .repository-content > div > div:last-child > div > div:first-child > div > h2 { height: 0px !important; overflow: hidden; margin-bottom: -2em !important; } /* tags */ .repository-content > div > div:last-child > div > div:first-child > div .f6 { display: flex; flex-wrap: wrap; max-width: 17rem; } .repository-content > div > div:last-child > div > div:first-child > div .f6 > * { flex-grow: 1; text-align: center; } .repository-content > div > div:last-child > div > div:first-child > div .f6:not(:hover) { opacity: 0.5; } /* contributors cell */ .repository-content > div > div:last-child > div > div > div > ul.list-style-none.d-flex { /* no change yet */ } /* last column with lng meter */ .repository-content > div > div:last-child > div > div:last-child { /* no change yet */ } /* languages as list */ /* (without meter) */ /* * OFF for now / .repository-content > div > div:last-child > div > div:last-child .Progress { display: none; } .repository-content > div > div:last-child > div > div:last-child ul.list-style-none li.d-inline { display: block !important; } /* */ }