(node, attr, respMap)
| 1900 | } |
| 1901 | |
| 1902 | function processNode(node, attr, respMap) { |
| 1903 | let text; |
| 1904 | switch (attr) { |
| 1905 | case textType.textContent: |
| 1906 | text = node.textContent; |
| 1907 | break; |
| 1908 | case textType.placeholder: |
| 1909 | text = node.placeholder; |
| 1910 | break; |
| 1911 | case textType.inputValue: |
| 1912 | text = node.value; |
| 1913 | break; |
| 1914 | case textType.ariaLabel: |
| 1915 | text = node.getAttribute('aria-label'); |
| 1916 | break; |
| 1917 | } |
| 1918 | |
| 1919 | if (pruneSet.has(text)) return; |
| 1920 | |
| 1921 | let formattedText = format(text); |
| 1922 | if (formattedText && withoutChinese(formattedText)) { |
| 1923 | signature(url.host + formattedText).then(sign => respMap[sign] ? replaceText(attr, node, respMap[sign]) : null) |
| 1924 | } |
| 1925 | } |
| 1926 | |
| 1927 | // endregion |
| 1928 |
no test coverage detected