Greasemonkey: Text processing - What's the best way to find certain words in a website and have a function work on it?
-
22-07-2019 - |
Question
I want greasemonkey to scan through a website and change certain words to something else. Is there a way to do it with regex or some other string processing function in javascript?
Thanks for your help :)
Solution
In greasemonkey you use the DOM and then on the text nodes regular expressions might be used for finding your words. Check the Wikiproxy user script for an example that searches for words and changes stuff.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow