|
Post by CD on Mar 30, 2005 23:02:34 GMT -8
Replaces "Calendar" button with a "Staff" button. PreviewPut in all headers. It is cross-browser. <script type="text/javascript"> <!-- /* Replace "Calendar" button with "Staff" button by CDDude229 This code may not be redistributed without permission. This header must stay intact at all times */ var aAH= document.getElementsByTagName("A") var aTD= document.getElementsByTagName("TD") if( aTD[2].innerHTML.match(/Hey/i) && aTD[2].innerHTML.match(/you have/i) ){ aAH[5].innerHTML="<img src='http://www.yourhost.com/image.gif' border=0>";} if(location.href.indexOf("action=calendar")!=-1) {window.location="/index.cgi?action=mlstaff"} //--> </script> First off, this is my first code that I'm actually publishing. Took me about 3 hours to make work. Considering I just learned JS, I feel pretty good that I managed to code it, and now that I'm posting it, I'll probably hear its possible to code it in 3 lines or something. Oh well. First, find this line: aAH[5].innerHTML="<img src='http://www.yourhost.com/image.gif' border=0>";} Change www.yourhost.com/image.gif to the link to your image.
Last Edit: Apr 15, 2005 15:27:02 GMT -8 by CD
|
|
|
Post by ShadowyOne on Apr 1, 2005 20:45:14 GMT -8
Good job, you're already farther along than I am.
I always found the calendar pretty useless, anyway.
|
|