Readable nofollows

I noticed that on Dave’s great new layout, his nofollow comment links where unreadable… This was caused by my greasemonkey script setting a pink background but not changing the text color and so forth. I’ve now changed it to do that, so I can read the name’s in the comments. So if you’re using this script, go get the new version of my nofollow-display greasemonkey script!

Tags: ,


Yoast.com runs on the Genesis Framework

Genesis theme frameworkThe Genesis Framework empowers you to quickly and easily build incredible websites with WordPress. Whether you're a novice or advanced developer, Genesis provides you with the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go.

Read our Genesis review or get Genesis now!

7 Responses

  1. Arjan EisingBy Arjan Eising on 9 July, 2007

    The Search Status Firefox add-on also allows you to highlight Nofollow links.

  2. Joost de ValkBy Joost de Valk on 9 July, 2007

    Yeah Arjan I know :) I’m just weird :P

  3. Rory SchellekensBy Rory Schellekens on 10 July, 2007

    Handige tip, is trouwens voor het eerst dat ik grease monkey gebruik, wel al veel over gehoord.

  4. HenriBy Henri on 19 October, 2007

    Is is terrible if I don’t use nofollow links?

  5. Joost de ValkBy Joost de Valk on 19 October, 2007

    Ehm well, no, but I’m using them more and more ;)

  6. André ScholtenBy André Scholten on 7 February, 2008

    Joost, there’s an other link you can’t see right now: the image link. If you have an anchor with only an image in it that has the border set to 0 you won’t see something pink.

    As a solution I added some lines that will check for images in the anchor. And if so: it will put a 2 pixel pink border around them.

    New version (don’t know if indenting stays intact):

    (function () {
    
      var re = /nofollow/i;  
      var candidates = document.getElementsByTagName("a");
    
      for (var cand = null, i = 0; (cand = candidates[i]); i++) 
      {
        if (re.test(cand.getAttribute("rel")))
        {
          theStyle = cand.getAttribute("style");
          if(theStyle == null) { theStyle = ""; }
    
          theStyle += ";font-weight:normal; background-color: pink; color: #000; border: 0; text-decoration: underline;";
          cand.setAttribute("style",theStyle);
          
          var imgs = cand.getElementsByTagName("img")
          if (imgs.length > 0)
          {
            for (var j = 0; j < imgs.length; j++)
            {
              imgStyle = imgs[j].getAttribute("style");
              if(imgStyle == null) { imgStyle = ""; }
                
              imgStyle += ";border: 2px solid pink";
              imgs[j].setAttribute("style",imgStyle);
            }
          }
        }
      }
    
    })();

    [/code]

  7. Joost de ValkBy Joost de Valk on 11 February, 2008

    Fixed it, thx André! Btw: you can just use <pre> in your comments here :)