|
1 |
| -import {WebExtension} from "./webExtension"; |
| 1 | +// import {WebExtension} from "./webExtension"; |
2 | 2 |
|
3 |
| -type ButtonListener = (notificationId: string, buttonIndex: number) => void; |
| 3 | +// type ButtonListener = (notificationId: string, buttonIndex: number) => void; |
4 | 4 |
|
5 |
| -export class WebExtensionNotifications { |
6 |
| - private static buttonListener: ButtonListener; |
| 5 | +// export class WebExtensionNotifications { |
| 6 | +// private static buttonListener: ButtonListener; |
7 | 7 |
|
8 |
| - public static setButtonListener(buttonListener: ButtonListener): void { |
9 |
| - WebExtensionNotifications.removeButtonListener(); |
10 |
| - WebExtensionNotifications.buttonListener = buttonListener; |
11 |
| - WebExtension.browser.notifications.onButtonClicked.addListener(buttonListener); |
12 |
| - } |
| 8 | +// public static setButtonListener(buttonListener: ButtonListener): void { |
| 9 | +// WebExtensionNotifications.removeButtonListener(); |
| 10 | +// WebExtensionNotifications.buttonListener = buttonListener; |
| 11 | +// WebExtension.browser.notifications.onButtonClicked.addListener(buttonListener); |
| 12 | +// } |
13 | 13 |
|
14 |
| - public static removeButtonListener(): void { |
15 |
| - if (WebExtensionNotifications.buttonListener) { |
16 |
| - WebExtension.browser.notifications.onButtonClicked.removeListener(WebExtensionNotifications.buttonListener); |
17 |
| - WebExtensionNotifications.buttonListener = undefined; |
18 |
| - } |
19 |
| - } |
20 |
| -} |
| 14 | +// public static removeButtonListener(): void { |
| 15 | +// if (WebExtensionNotifications.buttonListener) { |
| 16 | +// WebExtension.browser.notifications.onButtonClicked.removeListener(WebExtensionNotifications.buttonListener); |
| 17 | +// WebExtensionNotifications.buttonListener = undefined; |
| 18 | +// } |
| 19 | +// } |
| 20 | +// } |
0 commit comments