I often find my self looking for a link that will drop me in the middle of a web page. Often I find that the page has the needed <a name='foo'> tags but no easy way (e.g. a table of contents) to find them. Does anyone know of a plugin that shows where/what those tags are?

I'd need chrome but answered for others would be useful.


FWIW: this is what I ended up using:

javascript:(function(){var i,n,a;as=document.anchors;for(i=0;i<as.length;++i) {a=as[i];n=a.name;a.appendChild(document.createTextNode("#"+n));a.style.border="1px solid";;a.href="#"+n;}})();

Take that, and put it as the link address in a bookmark.

link|improve this question

40% accept rate
feedback

3 Answers

up vote 6 down vote accepted

Web Development Bookmarklets has a JavaScript bookmarklet called named anchors that will insert links at each <a name=""> anchor. To use the bookmarklet, add it to your favorites menu or links bar. Then, on any page, click on the "named anchors" bookmark to insert links into the current page. However, it doesn't work on Wikipedia or other sites that use id attributes of tags as anchors.

Edit:
Show Anchors is a more modern bookmarklet that shows both <a name=""> and id elements with an anchor icon. The icon is embedded in the bookmarklet as a data: URL, so it might not work in older browsers. (The bookmarklet link is at the very top of the post.)

link|improve this answer
I can't seem to make the second one work. – BCS Sep 27 '10 at 0:30
feedback

The Show Anchors add-on does just that on FireFox.

link|improve this answer
feedback

There's also a Chrome Extension for this: https://chrome.google.com/webstore/detail/nhppnhnadikeniijclnghjfblnojgige

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.