您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Right sidebar at repository page with description and other becomes top row, readme pulled above files.
当前为
/* ==UserStyle== @name GitHub - single column with important info on the top @namespace myfonj @version 1.3.0 @description Right sidebar at repository page with description and other becomes top row, readme pulled above files. @author myf ==/UserStyle== */ @-moz-document domain("github.com") { /* categorisation*/ } @-moz-document regexp("^https?://github.com/(?!password_reset|settings)([^#?/]+)/([^#?/]+)/?([#?].*)?$") { /* 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[data-pjax-container] > div > div + div:not(#\0) { display: flex !important; flex-wrap: wrap; } /* actual description at own "line" (THIS IS IT) */ main[id*="repo"] > div > div + div:not(#\0) > p:first-child { flex-basis: 100% } main[id*="repo"] > div > div + div:not(#\0) > * { margin-right: 1em; } /* baseline align */ main[id*="repo"] > div > div + div:not(#\0) > p:first-child + *.d-flex { display: block !important; } /* star / watch (duped at desktop header) */ main[id*="repo"] > div > div + div:not(#\0) > :last-child { display: none !important; } /* debugs */ /* repository-content = * / main > div:last-child > div.repository-content { outline: 1px solid purple !important; } /* "popover" = * / .repository-content > div > div:first-child { outline: 1px solid red !important; } /* "main table" & readme = * / .repository-content > div > div:last-child { outline: 1px solid green !important; } /* "info sidebar" = * / .repository-content > div > div:last-child > div:last-child > div { outline: 1px solid gold !important; } /* */ /* main rows-made-columns wrapper */ .repository-content > div > div:last-child { flex-direction: column-reverse !important; } /* now columns */ .repository-content > div > div:last-child > div { width: auto; } /* wrapper of - file navigation - files (moved to bottom, but first "row" with latest commit positioned to top) - readme (reordered to top) we could make space for "last commit" pulled above readme here but for now let's try visually injecting it in between branch selector and clone buttons */ .repository-content > div > div:last-child > div:first-child { position: relative; /*padding-top: 4rem;*/ } /* last commit & "commits" link */ .repository-content > div > div:last-child > div:first-child > div:nth-child(2) > div:first-child { position: absolute !important; top: -0.75rem; background-color: transparent !important; border: none; left: 20rem; right: 20rem; } /* sidebar-made-main-content 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:last-child > div { display: flex; flex-direction: row; flex-wrap: wrap; padding-bottom: 1rem; } .repository-content > div > div:last-child > div:last-child > div > * { flex-grow: 1; flex-shrink: 1; } /* no border nor paddings */ .repository-content > div > div:last-child > 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:last-child > div > div > *:first-child p { border: 1px solid red !important; display: none; } /* - license - dupe from header - readme - will be righ below this block */ .repository-content > div > div:last-child > div:last-child > div [href*="#readme" i], .repository-content > div > div:last-child > div:last-child > div [href*="/blob/master/LICENSE" i] { display: none !important; } /* - external link - dupe frome header */ .repository-content > div > div:last-child > div:last-child > div:first-child > div p + div svg.octicon-link, .repository-content > div > div:last-child > div:last-child > div:first-child > div p + div svg.octicon-link + span { display: none; } /* - "About" heading is quite redundant in there and it's cell may be "empty" now */ .repository-content > div > div:last-child > div:last-child > div:first-child > div:first-child h2 { display: none } /* tags */ .repository-content > div > div:last-child > div:last-child > div:first-child > div .f6 { display: flex; flex-wrap: wrap; max-width: 17rem; } .repository-content > div > div:last-child > div:last-child > div:first-child > div .f6 > * { flex-grow: 1; text-align: center; } .repository-content > div > div:last-child > div:last-child > div:first-child > div .f6:not(:hover) { opacity: 0.5; } /* Readme before files*/ .repository-content > div > div:last-child > div:first-child { display: flex; flex-direction: column; } .repository-content > div > div:last-child > div:first-child > .file-navigation { order: -2 } .repository-content > div > div:last-child > div:first-child > #readme { order: -1 } /* */ }