MCPcopy Index your code
hub / github.com/refined-github/refined-github / getLegacyStatus

Function getLegacyStatus

source/features/status-subscription.tsx:40–54  ·  view source on GitHub ↗
(button: HTMLButtonElement)

Source from the content-addressed store, hash-verified

38}
39
40function getLegacyStatus(button: HTMLButtonElement): SubscriptionStatus {
41 const reason = getLegacyReason(button).textContent;
42
43 // You’re receiving notifications because you chose custom settings for this thread.
44 if (reason.includes('custom settings')) {
45 return 'status';
46 }
47
48 // You’re not receiving notifications from this thread.
49 if (reason.includes('not receiving')) {
50 return 'none';
51 }
52
53 return 'all';
54}
55
56function addLegacyButton(subscriptionButton: HTMLButtonElement): void {
57 const status = getLegacyStatus(subscriptionButton);

Callers 1

addLegacyButtonFunction · 0.85

Calls 2

getLegacyReasonFunction · 0.85
includesMethod · 0.80

Tested by

no test coverage detected