Skip to content

Commit f44a19b

Browse files
authored
Add isRepliesSettings and include it in hasRichTextEditor (#46)
1 parent 7743dec commit f44a19b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,12 @@ collect.set('isRepoMainSettings', [
348348
'https://github.com/sindresorhus/refined-github/settings',
349349
]);
350350

351+
export const isRepliesSettings = (url: URL | HTMLAnchorElement | Location = location): boolean => getCleanPathname(url).startsWith('settings/replies');
352+
collect.set('isRepliesSettings', [
353+
'https://github.com/settings/replies',
354+
'https://github.com/settings/replies/88491/edit',
355+
]);
356+
351357
export const isRepoTree = (url: URL | HTMLAnchorElement | Location = location): boolean => isRepoRoot(url) || String(getRepoPath(url)).startsWith('tree/');
352358
collect.set('isRepoTree', [
353359
...collect.get('isRepoRoot') as string[],
@@ -430,7 +436,8 @@ collect.set('hasRichTextEditor', combinedTestOnly);
430436
export const hasRichTextEditor = (url: URL | HTMLAnchorElement | Location = location): boolean =>
431437
hasComments(url) ||
432438
isNewIssue(url) ||
433-
isCompare(url);
439+
isCompare(url) ||
440+
isRepliesSettings(url);
434441

435442
collect.set('hasCode', combinedTestOnly);
436443
export const hasCode = (url: URL | HTMLAnchorElement | Location = location): boolean => // Static code, not the editor

0 commit comments

Comments
 (0)