[Filterproxy-devel] Re: New module for FilterProxy
Brought to you by:
mcelrath
From: Bob M. <mce...@us...> - 2001-08-03 20:09:54
|
John F Waymouth [way...@wp...] wrote: > > > > Heh, usually when there's an ad-related article there, I post some > > blatent self promotion, but I didn't this time because I haven't written > > a anti-popup rule yet. ;) I prolly should. > > >=20 > Ok, so, I was bored, and wrote a very broad rule for popups, which not > only zaps em, but also tries to keep scripts using the window.open > function working: >=20 > rewrite regex /window\.open\(/ as eval("null //" + Clever, clever. > (note that space after the plus) >=20 > This has the following advantages: >=20 > * no need to try to find the whole window.open() call (matching parens, > ick) > * Convinces javascripts that window.open returned null > * Accepts whatever args they passed to window.open() seamlessly (the args > after the first aren't evalled, and anything in the first arg is > commented) >=20 > I didn't add an "inside encloser <script>" because that seems to replace > the entire <script> block (bug?). Yes, that's a bug, I'll look into it. This really should have the inside encloser <script>. > Lemme know what you think. Looks good. You sent this just as I was trying to find a site that has popups. Do you know of any? Cheers, -- Bob Bob McElrath (rsm...@st...)=20 Univ. of Wisconsin at Madison, Department of Physics |