Bill Brown bio photo

Bill Brown

A complicated man.

Twitter Github

Over at Found on the Web, I've made my first April Fool's joke. As you might expect, it's Rick-Roll related.

Here's the Javascript I used:

<script type="text/javascript" language="javascript">
var links = document.getElementsByTagName("a");
for (var i=0; i < links.length; i++)
links[i].onclick = function()
location.href="";return false;

It gets every hyperlink on the page, loops over them, and adds an onclick event handler that performs the redirect.