Skip to content

Commit d0491bd

Browse files
authored
Skip some features on private user profiles (refined-github#5814)
1 parent 74d52ad commit d0491bd

7 files changed

Lines changed: 22 additions & 8 deletions

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"filter-altered-clicks": "^1.0.1",
5555
"fit-textarea": "^2.0.0",
5656
"flat-zip": "^1.0.1",
57-
"github-url-detection": "^5.12.1",
57+
"github-url-detection": "^5.13.0",
5858
"image-promise": "^7.0.1",
5959
"indent-textarea": "^2.1.0",
6060
"js-abbreviation-number": "^1.4.0",

source/features/rgh-sponsor-button.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,5 +108,9 @@ void features.add(import.meta.url, {
108108
pageDetect.isUserProfile,
109109
pageDetect.isOrganizationProfile,
110110
],
111+
exclude: [
112+
pageDetect.isOwnUserProfile,
113+
pageDetect.isPrivateUserProfile,
114+
],
111115
init: handleSponsorButton,
112116
});

source/features/set-default-repositories-type-to-sources.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ async function init(): Promise<void> {
3030

3131
void features.add(import.meta.url, {
3232
init,
33+
exclude: [
34+
pageDetect.isPrivateUserProfile,
35+
],
3336
}, {
3437
exclude: [
3538
pageDetect.isGist, // "Your repositories" does not exist

source/features/show-user-top-repositories.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,8 @@ void features.add(import.meta.url, {
2323
include: [
2424
pageDetect.isUserProfileMainTab,
2525
],
26+
exclude: [
27+
pageDetect.isPrivateUserProfile,
28+
],
2629
init,
2730
});

source/features/user-local-time.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,5 +196,8 @@ void features.add(import.meta.url, {
196196
include: [
197197
pageDetect.isUserProfile,
198198
],
199+
exclude: [
200+
pageDetect.isPrivateUserProfile,
201+
],
199202
init: profileInit,
200203
});

source/features/user-profile-follower-badge.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ void features.add(import.meta.url, {
3232
],
3333
exclude: [
3434
pageDetect.isOwnUserProfile,
35+
pageDetect.isPrivateUserProfile,
3536
],
3637
init,
3738
});

0 commit comments

Comments
 (0)