()
| 111 | } |
| 112 | |
| 113 | async function generateDom(): Promise<void> { |
| 114 | // Generate list |
| 115 | await initFeatureList(); |
| 116 | |
| 117 | // Update list from saved options |
| 118 | syncedForm = await perDomainOptions.syncForm('form'); |
| 119 | |
| 120 | // Decorate list |
| 121 | updateListDom(); |
| 122 | initToggleAllButtons(); |
| 123 | |
| 124 | // Only now the form is ready, we can show it |
| 125 | $('#js-failed').remove(); |
| 126 | |
| 127 | // Enable token validation |
| 128 | void initTokenValidation(syncedForm); |
| 129 | |
| 130 | // Update rate link if necessary |
| 131 | updateRateLink(); |
| 132 | |
| 133 | // Hide non-applicable "Button link" section |
| 134 | if (doesBrowserActionOpenOptions) { |
| 135 | $('#action').hidden = true; |
| 136 | } |
| 137 | |
| 138 | // Show stored CSS hotfixes |
| 139 | void showStoredCssHotfixes(); |
| 140 | |
| 141 | void validateBackgroundPage(); |
| 142 | } |
| 143 | |
| 144 | function addEventListeners(): void { |
| 145 | // Update domain-dependent page content when the domain is changed |
no test coverage detected