note 90212 added to index
| From: | skds1433 at hotmail dot com | Date: | Fri, 10 Apr 2009 12:52:25 +0000 |
| Subject: | note 90212 added to index | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-153046@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 69.147.83.197
Probable Submitter: 98.242.61.56
----
Manual Page -- http://www.php.net/manual/en/index.php
Edit -- https://master.php.net/note/edit/90212
Del: integrated -- https://master.php.net/note/delete/90212/integrated
Del: useless -- https://master.php.net/note/delete/90212/useless
Del: bad code -- https://master.php.net/note/delete/90212/bad+code
Del: spam -- https://master.php.net/note/delete/90212/spam
Del: non-english -- https://master.php.net/note/delete/90212/non-english
Del: in docs -- https://master.php.net/note/delete/90212/in+docs
Del: other reasons-- https://master.php.net/note/delete/90212
Reject -- https://master.php.net/note/reject/90212
Search -- https://master.php.net/manage/user-notes.php