Google Filter
|
Jun. 07, 2004, 06:06 AM
Post: #16
|
|||
|
|||
Shea;
Some thoughts on filter construction..... First, good job. Does just what you wanted, and is easy to follow. Don't be so quick to say that you aren't very good at writing Proxo filters! Next, in a previous post, you said that you had to resort to a two-filter method, that you couldn't do it all in one filter. Hmmm. Let's analyze the name Cascading Style Sheet, shall we? For most people, it means "define it once, call it often". Not bad - sorta like a shortcut or a batch file, when you look at it like that. But wait, isn't a batch file simply a collection of commands that you actually could execute manually, one-by-one? Yes, indeed it is. So what we're saying here is, you can do it manually, or you can automate the process. Agreed? Good. The same thing holds true in HTML coding, particularly in regards to styles. Whenever you see a CSS callout (meaning, a defined style in the <head> section, or a reference to an external style sheet), you are looking at aggregated commands all rolled up into one short, easy to remember, name. Use that name in the HTML code, and you've not only saved a lot of typing, but if you need to change the appearance of something, you do it in only one place by editing the style, and every reference to that style changes accordingly. Neat, to say the least. But wait, what if we really want to "do it manually", can we? Yup, sure can. This is a golden rule - you can define styles right in the code, whenever and wherever you need to change the appearance from the default. Following that logic, you need only use a slightly different syntax, and your two-filter job now only needs one filter. To wit: Code: Name = "Highlight: Links Contained within HOSTS File" In short, I only did a couple of things differently, beside eliminate one filter. I used a font command instead of a style command to force a color change for the <a> tag; plus I dropped the link styles (hover, etc.) and the text decoration because it's not a link anymore. So why did I do this? Easy - to get it down to one filter, that's all. The less time Proxo spends matching and replacing, the sooner the page is passed on to the browser. But now I do have a question for you: Quote:... It is set only to work on Google and it grays out the links and sets the link to Google.com.....From where I'm sitting, it looks like you coded your Replace string with Quote:<a href=""Sure looks to me like the link is going nowhere, not back to Google. And if it did go back, I *think* it would go back to the main search page, not the current results page. I think, I don't know - I can't force it without rewriting the filter, and I like it like it is, so I'm not monkeying with it anymore, thank you very much. Let me know how this works for you in comparison to what you wrote. Oddysey I'm no longer in the rat race - the rats won't have me! |
|||
Jun. 07, 2004, 10:54 AM
Post: #17
|
|||
|
|||
Hmmm, good catch... I didn't notice the href=""...
But which href will take precedence? The blank href=""? Or the one contained within the \1 stack and replaced with the \1 stack? |
|||
Jun. 07, 2004, 12:32 PM
Post: #18
|
|||
|
|||
When I set the link to "", it showed up as going to google.com. I don't know why, but it did and I left it.
And thanks Oddysey for the filter, but it's not working correctly. It doesn't highlight it with 'gray, but it highlights it in that standard purple to let you know you've been to it. How can I make it show up gray all the time? �{=(~�::[Shea]::��~)=}� How 'bout you sideburns, you want some of this milk? This fading text is pretty cool, eh? I bet you wish you had some. |
|||
Jun. 07, 2004, 09:03 PM
Post: #19
|
|||
|
|||
ProxRocks and Shea;
My understanding is that the first instance of href= will assert control. Can't recall where or who from I learned that, and haven't tested it in some time, but that's what the little voices in my head tell me to write. :o In theory, if there's no link, then the link styles shouldn't have any effect. Shea, if you're seeing the purple underline, etc. then it's still a link, and perhaps what I just said above is null and void - the last instance of an href would have to be in control, not the first one. Perhaps you can modify your filter to remove the blank href="", and see what happens. Alternatively, examine the \1, and see if it's picking up something that the <a> tag needs, besides the source link. If not, then you could eliminate that from the Replace string, just as you did with the \0 portion of the Match. That should prove once and for all which instance the browser works on, first or last. Now, if what you see is not a link, then why is it a link color? Good question. In theory, the font should take care of it, as there is no valid link source. It could also be true (I've not tested this in a loooong time) that a current generation browser might 'see' the "http://www....." and sort of infer the existance of the href attribute. In IE5 and IE5.5, that wasn't true, but nowadays, who knows? (And no, I am not The Shadow! [lol] ) ProxRocks, what are you getting for color - gray (#C0C0C0), or a purple underline? Ooops, almost forgot. A blank href="" will show up in the status bar as the current domain, hence that's why you see it say "www.google.com". Pressing it should take you nowhere - proof that it's not a true link; you shouldn't even see the screen flicker. Oddysey I'm no longer in the rat race - the rats won't have me! |
|||
Jun. 07, 2004, 10:08 PM
Post: #20
|
|||
|
|||
Thsi filter works perfectly!
Code: Name = "Highlight: Links Contained within HOSTS File" �{=(~�::[Shea]::��~)=}� How 'bout you sideburns, you want some of this milk? This fading text is pretty cool, eh? I bet you wish you had some. |
|||
Jun. 07, 2004, 11:13 PM
Post: #21
|
|||
|
|||
Cool...
Gray? Purple? What was the question again? lol... |
|||
« Next Oldest | Next Newest »
|