// UDMv4.5 // You Are Here extension v1.2 // /***************************************************************\ ULTIMATE DROP DOWN MENU Version 4.5 by Brothercake http://www.udm4.com/ \***************************************************************/ /***************************************************************\ * Set you are here parameters \***************************************************************/ var youAreHere=[ "index.php", // default page name [eg "index.php", "default.html" etc] "You are here: ", // add text to here-page title ["text"|"none"] "You're in this branch: ", // add text to here-branch title ["text"|"none"] "before", // where to add title text ["before"|"after"] "no", // open here-branch menus automatically ["yes"|"no"] ]; /***************************************************************\ \***************************************************************/ //### REMEMBER TO CHANGE THE REGEX LITERAL //### "/[a-z]+\:\/\//" to "/[a-z]+\:\/\/" //### BEFORE CONCATENATING THIS SCRIPT //### THEN CHANGE IT BACK AFTERWARDS, OBVIOUSLY :) //global object var yah=new Object; //add to title method yah.addToTitle=function(titleNode,titleText) { //link text value yah.iText=''; //get child nodes yah.nodes=titleNode.childNodes; yah.nodesLen=yah.nodes.length; //for each node for(i=0; i=75) { clearInterval(t); } },200); }; //navbar initialised receiver function function findHere() { //don't continue if the tree doesn't exist var tree=document.getElementById('udm'); if(!tree){return false;} //store document address //normalize difference between http/https //by removing the 's' if it's present yah.uri=http://www.weedseeker.nl/index/toonitem/31586/53894/Toepassingen.html'; yah.uri=top.document.location.href.replace('https://','http://'); //remove default page name yah.uri=yah.uri.replace(youAreHere[0],''); //escape commas, otherwise IE doesn't do a proper URI comparision on them yah.uri=yah.uri.replace(/,/g,'%2C'); //create an array of possible matches yah.matches=[]; //get array of navbar links yah.links=tree.getElementsByTagName('a'); yah.linksLen=yah.links.length; //for each link for(var i=0; i