title: Hook window.location.* assignments and window.location.assign
body: <p>I'm trying to intercept <code>window.location.*</code> assignments and <code>window.location.assign</code> calls to change the url assigned before leaving is that possible?
  when I try to redefine the property setter I get an error that I can't redefine it.
  Is my only option is to proxy the page and statically replace all assignments to window.location with string replace?
  Although I rather avoid it since javascript is funky and something like this could also be valid so I would have to keep track of all assignments:</p>
  
  <pre><code>var l = window.location;
  var c = l;
  var t = c.assign;
  t('...');
  </code></pre>