Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
1  
Thanks. Too bad this doesn't seem to work with frames or heading anchors (it is possible to anchor on an H1, for example, not just on an <A>) –  rustyx Feb 28 '13 at 11:18
    
@rustyx, I'm not finding any examples of how to do that. –  BCS Feb 28 '13 at 15:46
add comment

3 Answers

up vote 7 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.)

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

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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