You can't change the window.location
prototype, because this a "native property" of window
and it is not configurable.
On Firefox (Greasemonkey), if you try to override this then you will get errors like:
TypeError: can't redefine non-configurable property 'location'
and
Error: Permission denied to shadow native property
...depending on how you attempt it. Other browsers give similar errors.
To block this kind of relocation, you need to interfere with the page's javascript on a case-by-case basis.
See "Stop execution of Javascript function (client side) or tweak it" for a general approach that works in Firefox. Although it may be much easier, depending on your target page's exact code.