3 ms·
For the future reference of anyone wanting to write text-replacement addons, using one of the techniques here https://stackoverflow.com/a/50537862 https://stack
by btown 4y ago
For the future reference of anyone wanting to write text-replacement addons, using one of the techniques here https://stackoverflow.com/a/50537862 https://stackoverflow.com/a/50537862 rather than simply doing `body.innerHTML = body.innerHTML.replace(...)` will avoid the problem of breaking links/scripts/CSS that happen to have your target phrase in the URL. Be kind to your DOM!