Post Reply 
Correct link targets (site-specific, list-based)
Nov. 04, 2012, 04:27 PM
Post: #4
RE: Correct link targets (site-specific, list-based)
duebel13 Wrote:I guess this filter isn't one of the fastest

The posted filter is missing some quotes and maybe a parenthesis. It doesn't import.

See "Blocklist Indexing (hashes)" at http://www.proxomitron.info/45/help/Bloc...ation.html , "Of course, it's better to be hashable.".

Also, I see "[Ff]". The Proxomitron's match is case insensitive.

duebel13 Wrote:and it still lacks regular expressions in the href match,

$TST(variable) is literal.

For "Remove: Specific Functions on sel. Sites", sidki choose to have the user add an entry to create an array.

Code:
## block specific functions                     $SET(sUserFn=§MATCH1§MATCH2§)
##
## "MATCH" targets function names and IF conditions, as well as the initial
## code within script tags.  Each string must be surrounded by section signs
## (§).  You just need to match the beginning of the target string, unless you
## append "$SET(sUserFnR==)".
##
## Example:
##   [^.]+.techtarget.com/      $SET(sUserFn=§HBX_§forMembersOnly§)
##
## Above entry would replace these code blocks on TechTarget sites:
##   function HBX_STRING() {/*...*/}
##   function HBX_ERROR() {/*...*/}
##   if (forMembersOnly && something) {/*...*/}
##   <script>forMembersOnly=true;/*...*/</script>
##
## If you append "$SET(sUserFnR=!)", replaced - hence empty - "if" blocks get
## executed instead of possible "else" blocks, which is the default.
##
## For above logic, plus exact string match only, append "$SET(sUserFnR=!=)".
## ----------------------------------------------------------------------------

Code:
Name = "Remove: Specific Functions on sel. Sites     09.07.04 [sd] (d.0)"
Active = TRUE
URL = "($TST(hCT=*html)|$TYPE(js)|$TYPE(vbs))$TST(sUserFn=*)"
Limit = 32766
Match = "function\s$TST(script=[1s]*)([^()"';]+{1,*})\4"
        "$TST(sUserFn=§(\5§$TST(\4=(($TST(\5)($TST(sUserFnR=*=*)|*))\6|*)))+)$TST(\6=*)"
        " $NEST(\(,\)) $NEST({,})"
        "$SET(1=function \4() { return String())$SET(2=S-Spec Fn: $GET(sUserFnR))"
        "|"
        "if \( $TST(script=[1s]*)($INEST(\( ,\)))\4"
        "$TST(sUserFn=§(\5§$TST(\4=(($TST(\5)($TST(sUserFnR=*=*)|*))\6|*)))+)$TST(\6=*)"
        "\)( //[^\r\n]+| /\**\*/)+ ($NEST({,})|(*;)+{1})"
        "$SET(7=$TST(sUserFnR=*!*)!)$SET(1=if (\70) {)$SET(2=S-Spec If: $GET(sUserFnR))$SET(3= - (\4))"
        "|"
        "<script((*>)+{1})\7( <!--[^\r\n]+)+ ([^<;\r\n]+{1,30})\4"
        "$TST(sUserFn=§(\5§$TST(\4=(($TST(\5)($TST(sUserFnR=*=*)|*))\6|*)))+)$TST(\6=*)"
        "$INEST(<script,</script)$SET(1=<script\7{)$SET(2=S-Spec Sc: $GET(sUserFnR))"
        ""
        "&($TST(volat=*.log:2*)$ADDLST(Log-Main,[$DTM(d T)]\tWEB SiteSpec_JS \2 \t\4 \t\u)|)"
        "$SET(eAdJS=$TST(hCT=*html)$GET(eAdJS)"
        "%3Cspan class=%22Pr0xFly-Span%22%3E$GET(mHead) \2%3C/span%3E"
        "$ESC(\4)%3Cbr class=%22Pr0xFly-Br%22 /%3E"
        ")"
Replace = "\1 /* PROX: \2 Removed\3 */ }"

duebel13 Wrote:Regards and <Gn(8)> (it's 8 min. past midnight here...)

Not a problem.
Have fun.
Add Thank You Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Correct link targets (site-specific, list-based) - JJoe - Nov. 04, 2012 04:27 PM

Forum Jump: