Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - arfirebird

Pages: [1]
1
Other / Filter to add Javascript Time & Date to webpages
« on: May 29, 2002, 08:20:42 PM »
OK, I can't take credit for writing the javascript on this
filter... I searched the web for a script to do what I
wanted & found one that was close...
did a couple of slight mods and came up with this.

Name = "Add Date & Time to top of page"
Active = TRUE
Multi = TRUE
Limit = 5096
Match = "<body1>"
Replace = "<body1><font color="ff0066"><center><script language="javascript"> date = new Date(); today=date.getDay(); if(today=="1") today="Monday"; else if(today=="2") today="Tuesday"; else if(today=="3") today="Wednesday"; else if(today=="4") today="Thursday"; else if(today=="5") today="Friday"; else if(today=="6") today="Saturday"; else if(today=="7") today="Sunday"; year=date.getYear(); month = date.getMonth(); hours = date.getHours(); if(hours < 10) hours = "0" + hours; minutes = date.getMinutes(); if(minutes < 10) minutes = "0" + minutes; seconds = date.getSeconds(); if(seconds < 10) seconds = "0" + seconds; day = date.getDate(); function y2k(number) { return(number<1000)?number+1900:number; } year=y2k(date.getYear()); if(month=="0") month="January"; else if(month=="1") month="February"; else if(month=="2") month="March"; else if(month=="3") month="April"; else if(month=="4") month="May"; else if(month=="5") month="June"; else if(month=="6") month="July"; else if(month=="7") month="August"; else if(month=="8") month="September"; else if(month=="9") month="October"; else if(month=="10") month="November"; else if(month=="11") month="December";  var the_date= today+" "+month+" "+day+","+year+" "; var the_time= hours+":"+minutes+":"+seconds; </script><script language="javascript"> document.write("Today is: " + the_date + ".  It's " + the_time + ".");  </script></font> </center>"

The Limit value may be larger than needed... not sure I haven't played
around with it to see if it still works like I want with a smaller value.
If you want to add the date & time to the bottom of the page instead
of or in additon to the top, download JD5000's config set (it has a filter
to add an END tag to the page, then make the following changes to
the filter above:

Name = "Add Date & Time to end of page"
Match = "<end>"
Replace = Same as filter above, just remove the "<body1>" part of
the replacement code.

The font will be red, you can of course change the font color value to
whatever suits your taste.

 

2
Questions and Answers / Trying to modify a complex filter
« on: May 17, 2002, 02:45:44 AM »
I downloaded the 3 filters for the Diamond Links (the
Superopener by BigPurpleMoon that is available over
under the "cosmetic" catagory on this board.
I like the filter a lot but wanted to change a couple
of minor things (not easy with a filter this complex
and my limited knowledge of html)...
The filter as it comes adds a diamond after some links
which when clicked opens up that link in a new window.
The other links that don't have a diamond can be opened
in a new window by clicking either of the last 2 letters
in the link.  
OK... the change I wanted to make is I wanted
to make it so that instead of clicking on the last 2 letters
in those links, that I could turn those links back to a standard link,
but add a diamond at the end of the link and make it like the
others, so that all links had diamonds
which would enable you to view the link in a new webpage.

Here's the 3 filters the way they were written by BigPurpleMoon:
==============================
Name = "Head >^ Style - Pre-Super-Opener - Option #2 (B)"
Active = TRUE
Multi = TRUE
Limit = 16
Match = "</head>|(<body)1$SET(2=<head>)"
Replace = "2"
          "<style type="text/css">"
          "#BPM-supero:hover { border: thin dotted #dd0000 }"
          "A.BPM-supero-d { font: 9pt verdana;"
          " color: #b22222; text-decoration: none;"
          " position: relative; top: -6px; left: -11px; }"
          "</style>"
          "</head>"
          "1"
          "$STOP()"

Name = "Links >^ SUPER-OPENER BETA 37 (aB) (bC)"
Active = TRUE
Multi = TRUE
Bounds = "<as*(<(\|)/a>|(<as))(^<!-- BPM_(W|A) -->)"
Limit = 450
Match = "<a"
        "("
        "([^>]++(shref=$AV(*))1[^>]+>)"
        "&&"
        "((shref=$AV(*)|starget=$AV(_blank|_new)"
        "|(sclass=$AV(*))2|(sstyle=$AV(*))3|((s[^ ]+)|>)#))+"
        ")"
        ""
        "( $NEST(<,(^(\|)/a(^?))*,> )+)4"
        ""
        "("
        "<(/a>|as)"
        "$SET(6= class="BPM-supero-d")"
        "$SET(7=◊)"
        "|"
        "(&[^; ]++; |[^<] )5"
        "($NEST(<,(^(\|)/a(^?))*,> )+ )8"
        "<((\|)/a>|as)$SET(7=<font size=-2>◊</font>)"
        "|"
        "(( (&[^; ]++;|[^<])"
        "$NEST( <,(^(\|)/a(^?))*,>)+)++{1,2})5"
        "( (&[^; ]++;|[^<])"
        " $NEST(<,(^(\|)/a(^?))*,> )+ )8"
        "<((\|)/a>|as)"
        "|"
        "( (&[^; ]++;|[^<])"
        " $NEST(<,(^(\|)/a(^?))*,> )+"
        "(&[^; ]++;|[^<])"
        " (&[^; ]++;|[^<]|$NEST(<,(^(\|)/a(^?))*,> )+)++ )5"
        "( (&[^; ]++;|[^<])"
        " $NEST(<,(^(\|)/a(^?))*,> )+"
        "(&[^; ]++;|[^<])"
        " $NEST(<,(^(\|)/a(^?))*,> )+ )8"
        "<((\|)/a>|as)"
        ")"
Replace = "<a123@45</a>"
          "<a id=BPM-supero6"
          " title=Open in new window"
          " target=_blank123>"
          "78</a>"
          "<!-- BPM_W -->"

Name = "Comments >^ Remove temporary proxomitron comment tags (C)"
Active = TRUE
Limit = 32
Match = "<!-- BPM_? -->"

===============================
Its the second filter -
Name = "Links >^ SUPER-OPENER BETA 37 (aB) (bC)"
that does most of the work.  
Here is my modification to this filter's replacement code:

======================
<a123@4578 </a>
<a id=BPM-supero 6
title=Open in new window
 target=_blank123>
<a id=BPM-supero 6
title=Open in new window
 target=_blank123<>
</a>
<!-- BPM_W -->
========================
which has the result of laying the page out the way I wanted
with diamonds after all the links, but there are 2 problems.
Problem 1 is the links that already had diamonds in the original
filter lost the hover title which said
"open in new window" after I modified it.  Problem 2
is more serious... None of the diamonds actually open a new
webbrowser, they just open the link in the same browser.
Any ideas on how to accomplish what I'm after?

I know this is a long winded question and I apologize for
asking so many questions lately, but I'm trying to figure this
stuff out.

Thanks



 

3
Questions and Answers / https sites
« on: May 16, 2002, 04:17:06 AM »
Question regarding filtering secure sites.  I am using the
2 files required to make Proxo filter secure sites, however
since setting Proxo to filter secure sites I get popup browser
warnings regarding certificates ( I think I may have stopped
that one by turning off the setting in IE to warn about certs),
but I am also getting a message stating the page contains
both secure and  insecure items and asks if I want to continue.
This warning isn't there if I bypass Proxo and reload the
page.  The obvious answer is to set it so it either doesn't
filter secure sites or that site in particular but I would like
to be able to filter it without having that warning popup as
the page loads.  The site I am looking at is answers.google.com.
They have it setup as a secure site, and anytime I type in the
address and try to load the page I get the secure and
non-secure mix warning.  Is there a way to get this warning to
stop?
Thanks


4
OK, I have made a filter to increase small font size on some pages
and it works but I want to add a restriction.  Here is the matching
expression:
size=-1|size="-1"|size=-2|size="-2"|size=1|size=2|size="1"|size="2"
(and there is probably a simplier way of inputting that)
and the replacement text:
size="3"
Now, my question is - this works for changing small text size, but it also
works to change things like the default size for dropdown boxes which I
don't want it to do.  I don't want to restrict it by changing the matching expression to "font size=-1" for example because I still want it to match
if it encounters something in the webpage like "font face=xxxx size=xxx".
So I was trying to get it to match using a bounds limitation with something like <font*>*</font>... I would like for it to only match a
"size=xxx" statement if it was between a <font> and </font>.  
I'm sure there's a simple way to do this but I haven't figured it out yet.
Thanks


 

Pages: [1]