note 90212 deleted from index by danbrown

From: Date: Fri, 10 Apr 2009 13:52:56 +0000
Subject: note 90212 deleted from index by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-153048@lists.php.net to get a copy of this message
Note Submitter: skds1433 at hotmail dot com ---- I'm using Avant Browser, but if you are using any browser that supports Javascript addons, you can use the following script to turn functions into links. var eleSpans = document.getElementsByTagName('span'); for (i=0; i<eleSpans.length; i++) { if (eleSpans[i].style.color == "#0000bb") eleSpans[i].innerHTML = '<a href="http://www.php.net/'+eleSpans[i].innerHTML+'" style="border:none; color:#0000bb; text-decoration:none;" target="_blank">'+eleSpans[i].innerHTML+'</a>'; } It's very simple, it looks for all "span" tags, and checks to see if the color is blue. There's are a few problems with it though. Variables, constants, and "<?php" tags are turned into links as well. That hasn't been a problem for me though, since I know what not to click on. It's been very helpful, because if I see a function I'm not sure about, I don't have to copy and paste it in the function search. This script has only been tested using a Trident based browser. I'm not sure if it will work with Opera, Safari, and/or FF. It uses "innerHTML", which is not a DOM standard method. I've not much time to work on it, so hopefully some people who like the idea can expand it.

« previous php.notes (#153048) next »