I want to run a Greasemonkey script on Firefox network error pages, such as (but not limited to) this one:
Can I do this with chrome://
URLs? If so, what are they? If not, is there another way?
I want to run a Greasemonkey script on Firefox network error pages, such as (but not limited to) this one:
Can I do this with chrome://
URLs? If so, what are they? If not, is there another way?
Well, I was almost on the right track. Two things:
about:neterror
, not chrome://
. If you try to access ww.example.com
(missing a w) then you will be redirected to about:neterror?e=dnsNotFound&u=http%3A//ww.example.com/&c=UTF-8&d=Firefox%20can%27t%20find%20the%20server%20at%20ww.example.com
// @include about:neterror*
.But since we know the URL format, we can
// @include *
and check:
if (document.documentURI.search('about:neterror') != -1) {
doStuffOnNetError();
}
Thanks for the hints, Brock.