Greasemonkey simple html text replacing not working -


I have to replace all the old links in the new web page with an HTML page so that I created the following script

document.body.innerHTML.replace ('www.forumoldpage', 'www.forumnewpage');

Save it but when I open the web page, nothing happens.

Is there anything wrong with the code or did I forget to do something?

I was led to this question when my very first attempt was made to create Gresbianby script, So I thought it was for the benefit of everyone, if this is the answer to this question. Try it out:

  document.body.innerHTML = document.body.innerHTML.replace ('www.forumoldpage', 'www.forumnewpage');  

replace gives you a new string with the replacement, but you still have to change the contents of the web page.


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -