title: Inject Javascript code into a web page
body: <p>I'd like to download web page as html file. Before I save the web page source code in html file, I'd like to edit some of the page content first. I assume I can edit the content using Javascript. Unfortunately I have little experience with Javascript. I guess I have to inject my script into the web page so that the browser can execute them together. How should I write my script? Should I write a standalone script and pass the page url to my script so that they can be executed at the same time? Or there are other ways to inject my script?</p>
  
  <p>EDIT: To make my problem clear, see <a href="https://stackoverflow.com/questions/14271919/surrounding-selected-text-with-tags">this post</a> and <a href="https://stackoverflow.com/questions/14244498/web-page-source-annotation-tool">this post</a></p>