Post Reply 
yet another inconsequential filter......
Jan. 14, 2005, 08:13 AM
Post: #1

This comes on the heels of a request from elshaddai, first expressed within this thread (for me, it's the last message on page 3). Essentially, he asked sidki3003 for a filter that would force a link to open its target in a new window. I responded with one of my own little tricks, but now I find I need to expand on it. I'll treat the whole thing here.

As usual, if you have anything to add to this discussion, talk to the hand. [wha] Oops, I mean, let me know! [lol] Just jump right in!

OK, here we go.

elshaddai Wrote:Sidki, could you include a filter like JD's that opens the google searches in a new window. Thanks a lot.

My big mouth opened wide, and this is what spewed forth:

Oddysey Wrote:That's pretty easy. I have several sites where I want this to happen, but Google was the first of them. :P If you find this to be handy, you might consider building a list of URL's, because the application is pretty generic. Otherwise, just put Google's address in the URL Match field.

My match string:

Match = "<a href="

My replace string:

Replace = "<a target="_blank" href="

Even if there is another target in the link, the first one is the one that is supposed to be recognized. However, if your browser doesn't follow this convention, then we can write a more complicated filter that will look for any other target statements, and replace them with the "_blank" designator. But the KISS principle is a good thing, I'm sure you'll agree. :P


Now, the problem comes when I stupidly invite The KISS Principle to join Mr. Murphy for a party on my tokus, [beatdown] where they dance the night away, much to my embarrassment. Here's the rub.

I spoke about using the "<a href=" construct. The first thing that should strike you is "Hey, not every link puts the HREF immediately after the <a." Right the first time, Mikey. I blew it. My only defense is that on my short list of sites, they all do use this construct, so I'm safe. But if you start doing this often, you'll likely run across a site that builds their links differently. Please make a note of it. (*click* hmmmmmmmm) Big Teeth

Furthermore, some sites will use that construct, but instead of going to another page and/or website, they'll stay right on the same page, and merely jump to a bookmark (the #name construct). That would really suXorz the hind one, if that were to jump to a new page, wouldn't it though.

There are only two ways around that: either write a more comprehensive filter, or don't use my KISS filter on sites that make use of the #name construct. Ugly, but true..... warts and all. Ugh, ptooie.

There you go, mates. The floor's open for discussion, have at it. [smoke]


I'm no longer in the rat race - the rats won't have me!
Add Thank You Quote this message in a reply
Jan. 15, 2005, 06:41 PM
Post: #2
An addendum to the above....

Per sidki's post in his ongoing thread, the above filter won't work within his config set, or at least, not without some modifications. sidki has posted another filter that, while a bit more complicated than mine, does work within his environment. Please see this thread, the appropriate post is near the bottom of page 4, at least for me.


I'm no longer in the rat race - the rats won't have me!
Add Thank You Quote this message in a reply
Post Reply 

Forum Jump: