Post Reply 
Google Alt Disp - prox-config-sidki_2011-12-22rc1
Feb. 15, 2012, 01:58 PM
Post: #1
Google Alt Disp - prox-config-sidki_2011-12-22rc1
JJoe, regarding the Google Search Alternate Display filter dated "11.12.13" (copied below), do you have any documented cases of the "interstitial" portion ever matching?

Code:
Name = "Google Search: Alternate Display     11.12.13 (multi) [sd ku] (d.s)"
Active = TRUE
Multi = TRUE
URL = "$TST(hCT=*html)(www|encrypted).google.(*/)+{1}(intl/(*/)+{1}(^?)|search\?(^tbm=isch|*\&tbm=isch)|webhp|(^?))$SET(keyword=$TST(keyword=\1.(i_layout:[#*:0].)+\2)\1.i_layout:2.\2)"
Limit = 2048
Match = "(^?)$SET(a=)$SET(b=)$STOP()"
        "|"
        "(<td class=$AV(j)$SET(classj=1))+"
        "<br>(\r\n+|\n\r+| <$SET(classj=)(^)|$TST(classj=1))$SET(1= )"
        "|"
        "<("
        "/b> of (about )+<b>[0-9,]+</b> ((from|over the) $NEST(<b>,</b >) )+for <b>( <b>)+[^<]+"
        "&&((<*>|?)+{95})\2???$SET(1=<\2...)*"
        ")"
        "|"
        "</style >(^$TST(b=s))$SET(b=s)$SET(1="
        "</style>\r\n<script type="text/javascript">"
        "var prxSpics=["http://local.ptron/sidki_h_$GET(cfg)/Google/google-","
        "new Image(),new Image(),new Image()];"
        "prxSpics[1].src=prxSpics[0]+"bug.png";prxSpics[2].src=prxSpics[0]+"top.png";"
        "prxSpics[3].src=prxSpics[0]+"new.png";"
        "</script>"
        "\r\n<style id="themed">\r\n"
        "/* Proxomitron "Google Alternate" CSS import */\r\n"
        "@import url(http://local.ptron/sidki_h_$GET(cfg)/Google/google-css-alt.css);\r\n\r\n"
        "/*prox-dummy*/</style>\r\n"
        ")"
        "|"
        "<div ("
        "id=("
        "$AV(ie6tb)>$INEST(<div,</div)</div >( $NEST(<script,</script >))+"
        "|$AV(exp_msgs)$INEST(<div,</div)</div >"
        ")"
        "|style=$AV(margin : -5px 0 5px)$INEST(<div,</div)</div >"
        ")"
        "|"
        "<(div|li)\2 class="
        "$AVQ(("+g)\#((\s*|")\#|))("
        "((^ style=$AV(margin-(left|right)*))($TST(a=odd)$SET(a=even)|$SET(a=odd))|)$SET(3=$GET(a))"
        ")(*<a)\#"
        "(*( href=$AV(/interstitial\?url\=h\9|((*/)+{1}/(*/)+{1})\9?*|*))\5*</a >)\4"
        "($TST(\9=t$SET(0="
        "<a href="h\9"><img src="http://local.ptron/sidki_h_$GET(cfg)/Google/google-bug.png""
        " width=16 height=10 border=0 title="Malware warning!"></a>&#160;&#160;"
        ")*|$SET(0="
        "<a href="\9"><img src="http://local.ptron/sidki_h_$GET(cfg)/Google/google-top.png""
        " width=10 height=10 border=0 title="Go to top domain"></a>&#160;&#160;"
        ")*)|)"
        "$SET(1="
        "<\2 class=\#&#x20;\3\#\#\4&#160;&#160;\0"
        "<a\5 target="_blank"><img src="http://local.ptron/sidki_h_$GET(cfg)/Google/google-new.png""
        " width=14 height=10 border=0 title="Open in new window"></a>&#160;&#160;"
        ")"
        "|"
        "<div class="sfbg nojsv" style="top:30px"></div>"
        "|"
        "<div class="sfbgg"></div>"
        "|"
        "<div style="position:relative;height:29px;z-index:2">"
        "$SET(1=<div style="position:relative;z-index:2">)"
        "|"
        "<a (^(^href=$AV(https+://*encrypted.google.com*) >"
        " <img src(*>&&*alt=$AV(\2)*)))"
        "$SET(1=<a id="logo" )"
        "|"
        "<a (^(^href=$AV(https+://www.google.com*) >"
        " <img src=\"/logo(*>&&*alt=$AV(\2)*)))"
        "$SET(1=<a id="logo" )"
        "|"
        "<div id="logocont""
        "$SET(1=<div)"
        "|"
        "<div style=$AV(max-width:509px)>"
        "$SET(1=<div>)"
        "|"
        "max-width$TST(tStyle=*)*(;|?(^(^\})))"
        "|"
        "#center_col,"
        "|"
        "#(mn{ table-layout:fixed;width:)\2996px"
        "$SET(1=\2100%)"
Replace = "\1"
Add Thank You Quote this message in a reply
Feb. 15, 2012, 03:59 PM
Post: #2
RE: Google Alt Disp - prox-config-sidki_2011-12-22rc1
(Feb. 15, 2012 01:58 PM)ProxRocks Wrote:  do you have any documented cases of the "interstitial" portion ever matching?

I don't think so but this doesn't mean it isn't out there somewhere. Wink
Google's code base is huge.

I didn't see any in sidki's notes, yet. I rarely document such things.
Add Thank You Quote this message in a reply
Feb. 15, 2012, 06:37 PM
Post: #3
RE: Google Alt Disp - prox-config-sidki_2011-12-22rc1
ah...

mmm, i've been trying to "narrow down" my own Google filters...
i guess i can always just as easily add it back in if i find it in the wild later on...

there just seems to be some code in the Alt Dis filter that was placed there YEARS ago but that i've not seen match anything for well over a year...
i guess i'd rather remove filter code that hasn't matched in YEARS as opposed to keeping it assuming the justification for it is "still out there", lol...
Add Thank You Quote this message in a reply
Feb. 17, 2012, 08:57 AM (This post was last modified: Feb. 17, 2012 09:06 AM by sbk.)
Post: #4
RE: Google Alt Disp - prox-config-sidki_2011-12-22rc1
isn't it possible add an alert ../help/Matching%20Commands.html#ALERT ?

or add an ../help/Matching Commands.html#ADDLST to that part of the match?
then check the ADDLST file after a month Smile!


semi-threadjack warning.. :-)

A while ago, I was trying to fix bad styles on a horribly stubborn webpage. i noticed an inline !important in the page. So I made a simple filter to erase the idiot's !important
I first wrote an ALERT into this:
Code:
Name = "CleanImportantCss[Sbk20111217T1a4"
Active = TRUE
Multi = TRUE
URL = "$TYPE(css)"
Bounds = "([a-z -]+\:[^!]+)\1 ! important"
Limit = 512
Match = "*"
Replace = "\1"
But during the next few hours, the alert annoyed me too often, so i deleted the ALERT.
I could have edited the filter to create a ADDLST log, but I don't think there's somewhere to send the (long) output.

PS. the filter's a bit loose, since it doesn't check if !important is inside style brackets or double quotes. I think a better filter would follow something like:
Code:
<style*>
[^<]+
([a-z -]+\:[^!]+)\1 ! important
*
</style>

or if checking for inline:
Code:
<[^ ]+\s*++style\=\"*++([a-z -]+\:[^!]+)\1 ! important[^"]+\"*>

but I dreaded hours of debugging.. Sad

someday I'll be reading a webpage discussing !important, and the sample code won't make sense. And maybe I'll send an email (no, don't!) to the website stating such. Oops. Big Teeth
Add Thank You Quote this message in a reply
Feb. 17, 2012, 11:56 AM (This post was last modified: Feb. 17, 2012 12:04 PM by ProxRocks.)
Post: #5
RE: Google Alt Disp - prox-config-sidki_2011-12-22rc1
lol...

i bumped into one of those "!important" codes over the years also, don't remember where...

it was a site i'd likely never ever land on again anyway, so i didn't write a filter for it at the time...

i do remember specifically that the web designer was "forcing" links to be UNDERLINED - i personally HATE underlined links! a page full of "underlines" is an eyesore, in my humble opinion... (edit: and web browsers have the USER-OPTION of to-underline or not-to-underline FOR A REASON, lol... coding "around" that is indeed IDIOTIC...)


actually, truth be told, i "reverse" link styling on this very forum, though i don't classify the underlines herein as an "eyesore" (because they all line up evenly with a border, not randomly placed chaotically throughout an article i'm reading or whatnot which instigated the creation of the filter)...

Code:
Name = "Header Top Inject: User CSS - Reverse Link Text-Decoration on sel. Sites [add]"
Active = TRUE
URL = "$TST(hCT=*html)($TST(keyword=*.rev_link.*))"
Limit = 16
Match = "(^(^<ProxHdrTop>))$STOP()"
Replace = "<style type="text/css">"
          "a    {"
          "    text-decoration: none !important;"
          "    }"
          "a:hover"
          "    {"
          "    text-decoration: underline !important;"
          "    }"
          "</style>\n"
(requires adding a keyword to Exc-U, of course...)
Add Thank You Quote this message in a reply
Feb. 18, 2012, 12:45 AM
Post: #6
RE: Google Alt Disp - prox-config-sidki_2011-12-22rc1
(Feb. 17, 2012 08:57 AM)sbk Wrote:  then check the ADDLST file after a month Smile!

These days, I could still not find it. I don't use enough of Google.
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: