MCPcopy
hub / github.com/Bistutu/FluentRead / replaceText

Function replaceText

userscripts.js:1670–1686  ·  view source on GitHub ↗
(type, node, value)

Source from the content-addressed store, hash-verified

1668
1669// 替换文本
1670function replaceText(type, node, value) {
1671 switch (type) {
1672 case textType.textContent:
1673 node.textContent = value;
1674 break;
1675 case textType.placeholder:
1676 node.placeholder = value;
1677 break;
1678 case textType.inputValue:
1679 node.value = value;
1680 break;
1681 case textType.ariaLabel:
1682 node.setAttribute('aria-label', value);
1683 break;
1684 }
1685 pruneSet.add(value) // 剪枝
1686}
1687
1688// 初始化程序
1689function initApplication() {

Callers 1

processNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected