()
| 145 | } |
| 146 | |
| 147 | function scanDOM() { |
| 148 | // find armored PGP text |
| 149 | try { |
| 150 | const pgpRanges = findPGPRanges(); |
| 151 | if (pgpRanges.length) { |
| 152 | attachExtractFrame(pgpRanges); |
| 153 | } |
| 154 | } catch (e) { |
| 155 | console.log('Detecting PGP messages failed: ', e); |
| 156 | } |
| 157 | if (currentProvider?.integration) { |
| 158 | return; |
| 159 | } |
| 160 | try { |
| 161 | const editables = findEditable(); |
| 162 | if (editables.length !== 0) { |
| 163 | attachEncryptFrame(editables); |
| 164 | } |
| 165 | } catch (e) { |
| 166 | console.log('Detecting editor elements failed: ', e); |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | /** |
| 171 | * Check the nodes text content for PGP_HEADER and PGP_FOOTER |
no test coverage detected