You do not need GM nor Opera for this task. Firefox comes with a
built-in capability for allowing/disallowing access to
properties/methods of DOM Objects on a per-site basis. It is called
Configurable Security Policies (CAPS) and it is described in [1].
Further examples and explanations are provided for example in [2] and
[3].
A short guide assuming the simplest case:
1) Close Firefox
2) Locate your profile folder [4]
3) Locate the file user.js within this folder. If it does not exist,
create it with a *text* editor (Notepad, vim, etc.), not with a 'word
processor' (MS Word, OpenOffice.org, Wordpad, etc.)
4) Add the following lines to user.js:
user_pref("capability.policy.policynames", "noframebuster");
user_pref("capability.policy.noframebuster.sites",
"http://www.annoying-site.com");
user_pref("capability.policy.noframebuster.Location.replace", "noAccess");
Of course, you will have to replace the domain with the one you want
to prevent from redirecting your frames.
5) Start Firefox.
6) Navigate to the above site and check that the location.replace hack
has been disabled. This affects only this domain and only this object
(the 'replace' method of the 'Location' DOM Object).
Please read carefully the informations about CAPS. Note in
particular, that there can be at most one line
user_pref("capability.policy.policynames", ...);
and be sure to understand how user.js and prefs.js work and how they
relate to each other.
Extra hint: in order to know the class name of a given object (in our
case 'Location' is the class name of the location object) just get a
reference X to a instance of the object in a script and look at
X.constructutor.toString(). For example:
alert(window.location.constructor.toString() ) ---> [Location]
alert(document.getElementsByTagName('A')[0].constructor.toString() )
--> [HTMLAnchorElement]
etc.
hth
e.
[1] http://www.mozilla.org/projects/security/components/ConfigPolicy.html
[2] http://kb.mozillazine.org/Security_Policies
[3] http://kb.mozillazine.org/Allowing_only_certain_sites_to_use_JavaScri...
[4] http://www.mozilla.org/support/firefox/profile#locate