I want to create a FFx that seaches each webpage that loads for a string and replaces it.

For example, change all occurences of
HTML Code:
here_is_a_string = "pub-xxxxxxxxxxxxxxxxx"
in the HTML to:

HTML Code:
here_is_a_string = "pub-4624026517548523"
How would I do this? I don't know any XUL, so I need a walk-through.