MCPcopy Index your code
hub / github.com/Bistutu/FluentRead / observeDOM

Function observeDOM

userscripts.js:1850–1866  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1848
1849// read:监听器配置
1850function 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:递归提取节点文本

Callers

nothing calls this directly

Calls 1

parseDfsFunction · 0.85

Tested by

no test coverage detected