()
| 1848 | |
| 1849 | // read:监听器配置 |
| 1850 | function observeDOM() { |
| 1851 | GM_xmlhttpRequest({ |
| 1852 | method: POST, |
| 1853 | url: read, |
| 1854 | data: JSON.stringify({page: url.origin}), // 请求参数 |
| 1855 | onload: function (response) { |
| 1856 | console.log("新的 read 请求:", url.host); |
| 1857 | |
| 1858 | let respMap = JSON.parse(response.responseText).Data; |
| 1859 | GM_setValue(url.host, respMap); |
| 1860 | parseDfs(document.body, respMap); |
| 1861 | }, |
| 1862 | onerror: function (error) { |
| 1863 | console.error("请求失败: ", error); |
| 1864 | } |
| 1865 | }); |
| 1866 | } |
| 1867 | |
| 1868 | |
| 1869 | // read:递归提取节点文本 |
nothing calls this directly
no test coverage detected