Two nice bookmarklets

Seth had a nice bookmarklet in a post today, it shows all links on a page. I altered it a bit to make the links clickable, and it works quite nice. So here’s a bookmarklet:

javascript:(function(){as=document.getElementsByTagName("a");str="<ul>";for(i=0;i<as .length;i++){str+="<li><a href="+as[i].href+">"+as[i].href+"</a>\n"}str+="</as></ul>";with({document.write(str);document.close();}})()

I immediately made another one as well which shows all the meta’s on a page:

javascript:(function(){metas=document.getElementsByTagName("meta");str="<ul>";for(i=0;i<metas .length;i++){str+="<li><b>Name:</b> "+metas[i].name+"<br />\n<b>Content:</b> "+metas[i].content+"\n" }str+="</metas></ul>";with({document.write(str);document.close();}})()

4 Responses

  1. David Bradley Blog Tips
    By David Bradley Blog Tips on 4 October, 2007

    Such a great idea. In Firefox add a keyword to each bookmarklet, e.g. links and meta and then they become accessible as address bar shortcuts if you’re a keyboard as opposed to a mouse jockey…


  2. Lionel
    By Lionel on 10 June, 2008

    Nice addon.
    Simple but useful.
    Thank you for sharing your knowledge!

  3. Yossarian
    By Yossarian on 3 July, 2008

    Hi Joost, just popped by to pick up your greasemonkey scripts and noticed these. There seems to be a small problem with it though.

    The code extends right across your screen rather than going onto a new line so it looks a bit messy.

    Also the actual bookmarklet links dont appear to work properly the code in the links only shows:


    rather than the full code.

    It very well could be working and it is just my Firefox being stupid, so sorry for this pointless post if thats the case!

  4. Techie Zone
    By Techie Zone on 1 July, 2009


    I have the same problem, I am not sure how this can be used or the bookmarklet itself is dysfunctional.