Skip to content

Instantly share code, notes, and snippets.

@yyolk
Created May 10, 2012 06:13
Show Gist options
  • Save yyolk/2651343 to your computer and use it in GitHub Desktop.
Save yyolk/2651343 to your computer and use it in GitHub Desktop.
quinquin
<!DOCTYPE html>
<html xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Font Test" />
<meta name="author" content="Quinn Keaveney" />
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
<title>JUXT</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script>
String.prototype.rot13 = rot13 = function(s)
{
return (s = (s) ? s : this).split('').map(function(_)
{
if (!_.match(/[A-Za-z]/)) return _;
c = Math.floor(_.charCodeAt(0) / 97);
k = (_.toLowerCase().charCodeAt(0) - 96) % 26 + 13;
return String.fromCharCode(k + ((c == 0) ? 64 : 96));
}).join('');
};
</script>
<script type="text/javascript">
$(function(){
$("textarea#one").keyup(function(){
$("textarea#two").val($(this).val().rot13());
});
}
);
</script>
</head>
<body>
<div id="wrapper">
<div >
<h2 id="header">JUXT/</h2>
<h3 class="tag">Appropriation for Cultural Production</h3>
</div> <!-- end #header -->
<div id="content">
<textarea class="input" id="one"></textarea>
<textarea class="one" id="two"></textarea>
</div>
<div id="footer">
<p>Copyright &copy; 2012 Boredbytv.com</p>
</div> <!-- end #footer -->
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment