(button: HTMLButtonElement)
| 38 | } |
| 39 | |
| 40 | function 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 | |
| 56 | function addLegacyButton(subscriptionButton: HTMLButtonElement): void { |
| 57 | const status = getLegacyStatus(subscriptionButton); |
no test coverage detected