Hi all
There was a discussion at Yahoo! Groups about using prox filters with DHTML menues.
We finally got a nicely working version. It's here:
http://www.flaaten.dk/forum/attachments/dhtml-menu.zipThis is the filter to inject it:
Name = "<start> Inject: DHTML Menu Script"
Active = TRUE
Limit = 1
Match = "<start>"
Replace = "<script type="text/javascript" src="http://local.ptron/menu.js"></script>
"
I included two functions.
The first, AddToolbar(name,url) is for this filter:
Name = "<end> Add: Flyover Toolbar"
Active = TRUE
URL = "$TYPE(htm)(^$LST(Bypass_Start-End))"
Limit = 1
Match = "<end>"
Replace = "</pre><a name="xdown"></a>
"
"<center>
"
"<a class="proxobar" onmouseover="linkset[1]
"
"=AddToolbar('bypass','xbypass..hp')
"
" + AddToolbar('bweb','xbweb..hp')
"
" + AddToolbar('bout','xbout..hp')
"
" + AddToolbar('bin','xbin..hp')
"
" + AddToolbar('src bypass','xsrc..bypass..hp')
"
" + AddToolbar('src','xsrc..hp')
"
" + AddToolbar('dbug','xdbug..hp');
"
" showmenu(event,linkset[1])" onMouseout="delayhidemenu()"> prox </a>
"
"<a class="proxobar" onmouseover="linkset[1]
"
"=AddToolbar('netcraft','uptime.netcraft.com/up/graph/?host=h')
"
" + AddToolbar('samspade','
www.samspade.org/t/lookat?a=h')
"
" + AddToolbar('ss-blackhole','
www.samspade.org/t/rbl?a=h')
"
" + AddToolbar('robots?','h/robots.txt');
"
" showmenu(event,linkset[1])" onMouseout="delayhidemenu()"> site </a>
"
"</center>
"
Toolbar notes:
The first replacement line of the filter closes any open preformat tag and inserts an anchor,
so that you can call a page by somepage.html#xdown to go straight to the end.
It's not necessary for the toolbar, you can safely delete it.
Here are my styles for the toolbar, append them to your css file if you like:
.proxobar
{
display:inline;
font-size: x-small;
font-weight: bold;
font-style: normal;
font-family: "Times New Roman" serif;
color: #d7d7ff;
background-color: #606060;
";
}
The second function, AddMenuItem(name,url,target) is called by this filter:
Name = "Open in new window (Flyover)"
Active = TRUE
URL = "$TYPE(htm)"
Bounds = "<as*>"
Limit = 768
Match = "(*href=)1$AV(2) 3"
Replace = "1"2""
" onmouseover="linkset[0]=AddMenuItem('New Window','2','_blank');"
" showmenu(event,linkset[0])""
" onMouseout="delayhidemenu()"3"
It's a replacement for the Super Opener (new window) filter.
I don't think i like it very much, so it's just a demo how to use the script for other filters.
Script notes:
I tested this script with IE6 only, but heard it works with Mozilla.
It does
not work with Opera (modifying document structure not possible).
The style for the menu is part of the script and is overridden on some sites (any ideas?).
The onmouseover and onmouseout delays can be adjusted via variables at the top of the script.
Same goes for the menu offset. Set offsetX and offsetY to 0 if you want normal flyover behavior.
regards, sidki
Edited by - sidki3003 on 15 Jun 2002 01:00:56