11

I am (marginally) color-blind and have great difficulty distinguishing between hyperlinks and normal text on the SE-Programmers site. I can barely tell when the text is actually a link. To my eyes, there just isn't enough visual contrast. (Unlike on StackOverflow, for instance, where the blue links stand out vividly to me. For that matter, the orange(?)-colored links on this meta-page are easily distinguishable as well.) Can anyone suggest a workaround for this situation (for example, a browser-hack of some sort)?

Note: I am (unfortunately) obliged to use IE at work, so no non-IE browser-specific workarounds will suffice.

Update: As Yannis pointed out, my question is very similar in nature to this question, but in my case, I'm not asking for a global site-wide change (though that would be nice), but rather just a workaround for my own setup.

2

1 Answer 1

7

This is fairly easy to accomplish using IE's Accessibility options in Tools » Internet Options » General » Accessibility. If you follow the instructions to the letter, results look as blindingly amazing as this:

Screenshot after settings applied

Create a file named userstyle-programmers.css and enter the following contents:

.question-page .post-text a {
text-decoration: underline !important;
color: orange !important;
}
.question-page .post-text a:hover {
color: yellow !important;
}

Select it in the aforementioned dialog under User style sheet and save.

Screenshot of settings dialog


Now, one downside to this is that is it applied to all sites. While the CSS is probably restrictive enough to only actually apply the style to SE sites, it'll get applied to all of them.

Screenshot of SU with same style applied

To prevent this, create a new file named e.g. userstyle-switcher.css with the following contents that are actually a script executed for every html element loaded. Not as nice as domain selection in Greasemonkey, but at least it works.

html {
   behavior:expression( (function(el){
   var _doc = el.document;
   if(_doc.location.host.toLowerCase() == 'programmers.stackexchange.com') {
     var elmLink = _doc.createElement('link');
     elmLink.rel='stylesheet';
     elmLink.type='text/css';
     elmLink.href= 'file://C:/Users/Daniel Beck/Documents/userstyle-programmers.css';
     _doc.getElementsByTagName('head')[0].appendChild(elmLink);
   }

   el.runtimeStyle.behavior = 'none';
  })(this));
}

Of course, replace C:/Users/Daniel Beck/Documents/userstyle-programmers.css with wherever you saved the other user style sheet file. Remember to use forward slashes and specify the actual path on disk, not what Explorer shows you (so no My Documents on e.g. Windows 7). Save, and select this file as the user style sheet for IE. The script will get execute on every web page, but the other CSS file will only get loaded when on programmers.stackexchange.com.

Most of the "CSS" used in the switcher script is from here, but I have no idea what that page says around the code.

7
  • Extremely clever and very useful suggestion -- thank you! Unfortunately, the switcher script is not working for me, and I'm not sure how to "debug" it. When I select the userstyle-switcher.css, there is no effect. I suspect my workstation has user scripts disabled or something, and I don't know how to change that setting.
    – kmote
    Aug 8, 2012 at 21:56
  • @kmote Note that you need to reload the page after setting it. The effect is not immediate as for the other. Aug 9, 2012 at 4:19
  • Re-loading didn't help, but I'll select your answer anyway because your first suggestion is so useful.
    – kmote
    Aug 9, 2012 at 14:38
  • @kmote What browser version, OS? It worked like a charm on Windows 7. Aug 9, 2012 at 15:02
  • @kmote I've pinged Stack Exchange about your question, I don't know if there's much they can do or if they'll treat this as a priority item (lately we've been pestering them to build us a lot of stuff).
    – yannis
    Aug 9, 2012 at 17:57
  • @DanielBeck - I'm using IE9 on Win7, but it is locked down pretty tightly by employer, so they may have turned off something.
    – kmote
    Aug 9, 2012 at 19:27
  • @YannisRizos: thanks!
    – kmote
    Aug 9, 2012 at 19:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .