Skip to content

Commit

Permalink
Restore clean-repo-header feature (refined-github#6908)
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante authored Sep 17, 2023
1 parent 98d7854 commit ca58484
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ Thanks for contributing! 🦋🙌
- [](# "prevent-pr-merge-panel-opening") Prevents the merge panel from automatically opening on every page load after it’s been opened once.
- [](# "command-palette-navigation-shortcuts") Adds keyboard shortcuts to select items in command palette using <kbd>ctrl</kbd> <kbd>n</kbd> and <kbd>ctrl</kbd> <kbd>p</kbd> (macOS only).
- [](# "submission-via-ctrl-enter-everywhere") Enables submission via <kbd>ctrl</kbd> <kbd>enter</kbd> on every page possible.
- [](# "clean-repo-header") [Avoids content shift and by hiding duplicate information on the repository home.](https://user-images.githubusercontent.com/1402241/218252904-6a31a933-41a7-452e-b841-9484e67429a8.png)

<!-- Refer to style guide above. Keep this message between sections. -->

Expand Down
19 changes: 19 additions & 0 deletions source/features/clean-repo-header.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#repository-container-header:not(:has(.js-repo-nav)) /* Excludes pre-Global Navigation Update header */
:is(
#repo-stars-counter-star,
#repo-stars-counter-unstar,
#repo-network-counter, /* Forks */
#repo-notifications-counter, /* Watchers */
.js-codespaces-details-container summary .Button-label /* Green "Code" button label */
) {
display: none;
}

/* Hide text of "Edit Pins" dropdown button in header of organization repos https://github.com/refined-github/refined-github/pull/5612 */
.pagehead-actions pin-organization-repo summary {
font-size: 0 !important;
}

.pagehead-actions pin-organization-repo .octicon-pin {
vertical-align: middle !important;
}
1 change: 1 addition & 0 deletions source/refined-github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import './features/readable-title-change-events.css';
import './features/clean-checks-list.css';
import './features/sticky-csv-header.css';
import './features/mark-private-repos.css';
import './features/clean-repo-header.css';

// DO NOT add CSS files here if they are part of a JavaScript feature.
// Import the `.css` file from the `.tsx` instead.
Expand Down

0 comments on commit ca58484

Please sign in to comment.