title: Chrome Extension Help: Replace URL string on page load
body: <p>I have this problem. Specific website, I have visited literally thousands of pages in it. I have enabled css visited links highlighting so I don't waste my time going back to pages I have already seen then ... the website changes its url structure</p>
  
  <p>it used to be: <a href="http://www.blah.com/example.phtml?blah&amp;bleh&amp;hit=10&amp;fromsearch" rel="nofollow">http://www.blah.com/example.phtml?blah&amp;bleh&amp;hit=10&amp;fromsearch</a>
  now it became  <a href="http://www.blah.com/example.phtml?blah&amp;bleh&amp;hit=10&amp;fromsearch&amp;hit_id=10" rel="nofollow">http://www.blah.com/example.phtml?blah&amp;bleh&amp;hit=10&amp;fromsearch&amp;hit_id=10</a></p>
  
  <p>which messes up visited pages.</p>
  
  <p>Now the Visited Pages file chrome uses is encrypted so I can't inject "hit_id=10" into all my browsing history and be done with so I am wondering if I can do the reverse with an extension.
  Ie strip all instances of "hit_id=10"  from all the links as the page is rendered. I can figure out the js</p>
  
  <pre><code>&lt; script type="text/javascript" &gt;
  document.body.innerHTML = document.body.innerHTML.replace(new RegExp("&amp;hit_id=10", "g"), "");
  &lt; /script &gt;
  </code></pre>
  
  <p>What I can't figure out is how to get to execute (if it can) on all pages it loads from a specific domain</p>
  
  <p>PS yes &amp;hit_id=10 is completely redundant as a field</p>
  
  <p>Any/all help appreciated</p>