sindresorhus/refined-github

Do you want to work on this issue?

You can request for a bounty in order to promote it!

Hide the "Public" repo badge #4767

WEGFan posted onGitHub

Description

Hide the "Public" repo badge in profile page, repo list and repo page. It seems like it's recently added to GitHub but I think it's a little distractive and I prefer old behaviour, which is only shows private and archived badge.

Screenshot

Example URL


There is a PR for this, but you have to wait summer feature freeze to end.

For the moment please use https://github.com/kidonng/cherry/tree/master/scripts#github-hide-public-badge

Or a CSS only workaround, do note this is imperfect.

/*
 * Hide the badge on repository home and popup
 * This include all badges lik "Private" or "Template" but you can always tell from the icon
 */
[itemprop='name'] + .Label,
.Popover .f5 + .Label,
/*
 * Hide the Public badge on profile repository list and profile pinned items
 * This include "Public archive" and "Public template"
 */
.public [itemprop^='name'] + .Label,
.pinned-item-list-item-content .Label {
  display: none;
}

/*
 * Revert https://github.com/sindresorhus/refined-github/blob/da5213eef3bb0308fe403ae94ce08f3fb1ee0dae/source/features/ci-link.css#L9-L12
 * We need to revert this style in order to perfectly hide the badge on repository home
 */
.rgh-ci-link .Label + .commit-build-statuses {
    margin-left: 0;
}
posted by kidonng over 3 years ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests