Submitted by johnh on December 1, 2008 - 16:52.
Javascript's never been high on my list of stuff to give a monkey's about. (Try parsing that, Babelfish!)
This is something of a shame since the largest portion of the list of things in the world which make me want to reach through my monitor across the internet towards web site "designers" and punch them repeatedly in the face could be forcibly corrected with Greasemonkey. If, that is, I could get over my prejudice regarding how all these bloody things which need correcting were caused by some fucknugget misusing Javascript in the first place.
Plus, such Greasemonkey scripts can be compiled into Firefox extensions, allowing me to proselytise the One True Right Answer to $something in that way, rather than pointlessly suggesting they install Greasemonkey and then a script for it, which they won't do because they're normal.
Anyhoo.
I want a Firefox extension which does this:
1. Scans every <a> element on the page, and if its href attribute does not contain a URI and only a URI, but instead says "#" or "javascript:openWindow()" or "javascript:void()" or some other obnoxious wankstainery,
2. Searches all the other attributes in the <a> element for a valid URI, then puts that in the href attribute and removes all the other attributes.
3. (Bonus) If it can in some way discover who was responsible for the thing which we just had to fix, punish them in some way, ideally in a fashion involving physical injury.
Because every day, thirty or forty times, I open a new link in a tab by middle-clicking on something only to later get to said tab and find your stupid fucking Javascript link in the address bar instead of a web page, you twats.
Pause. Breathe.
Oh, yeah. While we're at it... let's strip all new-window triggers from all pages, always, as well.
Do you add 'rel="_new"' to your links? Then fuck you. I'll open new windows when and if I want to, not because you think your shitty little blog should remain in its own place indefinitely because it's so much more important than the thing you linked to which is far more interesting than you are. You back-button-breaking, neophyte-confusing, resource-grabbing, clueless arsehole.
I'm pretty sure that these are widely-held (if often less profanitorily-expressed) opinions shared by all right-thinking people, and that at least one of them can whip this up as a userscript or extension. Let's get it done, if only for the sake of those of us who have to support the PCs of our less-nerdy relatives.
I can only hope that the Lazyweb somehow magics this into existence 'cos it'll take me several weeks I don't have to figure it out for myself.

John Keyes (not verified) | December 1, 2008 - 19:24
If you were doing work for a client and she insisted you add
target="_new"to a link, what would you do?I'm in agreement with you BTW, just curious as to how you'd handle the situation above.
»