Greasemonkey Script to remove blink tags
Those of us who have been playing w/ the web since the early days have a special relationship with the HTML <blink> tag, having suffered through its noxious heyday. Today, thankfully, few sites I care about still employ it. However there is a chess openings web application which I use pretty frequently, which uses <blink> on every page, right next to the practice board. Since chess requires concentration, and the blink tag is explicitly designed to attract your attention, it’s one of the worst UI design decisions I’ve come across. Since there’s little chance of convincing the site’s web developers to change their code, I decided to take matters into my own hands and write a Greasemonkey script to strip the annoyance out myself. For those new to Greasemonkey, it is a browser plugin that lets you alter the markup in any given page or pages to modify its styling or behavior. Of course it only modifies it for *me*, but that’s all I selfishly care about. So, in case anyone else out there hates <blink> the way I do and wants to make use of this simple script, here it is. You’ll want to change the UserScript section to suit your specific needs of course.
// ==UserScript==
// @name blink tag removal
// @namespace eudesign.com
// @include http://www.eudesign.com/*
// ==/UserScript==
var allBlinkTags, thisBlinkTag, spanTag;
allBlinkTags = document.getElementsByTagName('blink');
for (var i=0; i<allBlinkTags.length; i++){
thisBlinkTag = allBlinkTags[i];
spanTag = document.createElement('span');
spanTag.innerHTML = thisBlinkTag.innerHTML;
thisBlinkTag.parentNode.replaceChild(spanTag, thisBlinkTag);
}

Add New Comment
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Add New Comment
Trackbacks