Y
Size: a a a
Y
AM
КТ
КТ
D
BI
IS
IS
BI
BI
DL
N
U
U
AB
N
textReplacer() {
const replaceOnDocument = (pattern, string, {target = document.body} = {}) => {
[
target,
...target.querySelectorAll("*:not(script):not(noscript):not(style)")
].forEach( ({childNodes: [...nodes]}) => nodes
.filter(({nodeType}) => nodeType === document.TEXT_NODE)
.forEach((textNode) => textNode.textContent = textNode.textContent.replace(pattern, string)));
};
replaceOnDocument(/^нурсултан/g, “астана);
}
U
N
replaceOnDocument(/^нурсултан$/g, “астана);
replaceOnDocument(/^нурсултан/g, “астан);
AM