Created
January 11, 2016 07:54
-
-
Save fwaggle/d99435941e4cc2d728c4 to your computer and use it in GitHub Desktop.
xkcd #1625
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<a href="javascript:var xkcd={ | |
'debate': 'Dance-off', | |
'self driving': 'Uncontrollably swerving', | |
'self-driving': 'Uncontrollably swerving', | |
'poll': 'Psychic reading', | |
'candidate': 'Airbender', | |
'drone': 'Dog', | |
'vows to': 'probably wont', | |
'at large': 'very large', | |
'successfully': 'suddenly', | |
'expands': 'physically expands', | |
'first-degree': 'friggin awful', | |
'second-degree': 'friggin awful', | |
'third-degree': 'friggin awful', | |
'an unknown number': 'like hundreds', | |
'front runner': 'blade runner', | |
'global': 'spherical', | |
'years': 'minutes', | |
'no indication': 'lots of signs', | |
'urged restraint by': 'drunkenly egged on', | |
'horsepower': 'Tons of horsemeat', | |
'horse power': 'Tons of horsemeat' | |
}; | |
var newHtml = document.body.innerHTML; | |
for (var key in xkcd) { | |
if (xkcd.hasOwnProperty(key)) { | |
var re = new RegExp(key, 'gi'); | |
newHtml = newHtml.replace(re, xkcd[key]); | |
} | |
}; | |
document.body.innerHTML = newHtml;">1625</a> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment