title: How do I get Greasemonkey to redirect to a local resource?
body: <p>A site that I frequent recently shut down. However, I have all the resources that I frequent backed up to my local machine. I'm attempting to access them through my bookmarks and whatnot without having to manually adjust every single bookmark. As such, I wrote a Greasemonkey Script for firefox that should redirect each file to the resource on my local drive. Here is my script:</p>
  
  <pre><code>// ==UserScript==
  // @name        Resource Redirect
  // @namespace   Resource Redirect
  // @include     http://www.domain.com/*
  // @version     1
  // @grant metadata
  // @run-at document-start
  // ==/UserScript==
  
  var URL = window.location.href;
  var newURL = URL.replace('http://www.domain.com/sites/default/files/','file:///I:/folder/files/');
  // alert(newURL);
  window.location.href = newURL;
  </code></pre>
  
  <p>The alert is kicking out the correct file path and name to the local resource. If I copy and paste that file path from the alert (which I'm only using for debugging purposes) into the address bar, it pulls up the correct file. So the replace and all the code up to the very last line is working. But it's not redirecting. It just stays on the existing URL and displays the 404 error. What am I doing wrong? Thanks.</p>