Created
January 3, 2013 03:35
-
-
Save ttepasse/4440554 to your computer and use it in GitHub Desktop.
Rövarspråket
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
/** | |
* Rövarspråket | |
*/ | |
html { | |
background: linear-gradient(0deg, khaki, green); | |
min-height: 100%; | |
} | |
table { | |
margin: 5em auto | |
} | |
th { | |
font-family: sans-serif; | |
text-align: left; | |
font-weight: 100; | |
color: darkgreen | |
} | |
th:last-child { | |
text-align: right; | |
} | |
td, th { | |
padding: 0em 1em; | |
} | |
textarea { | |
width: 30em; | |
height: 10em; | |
font-size: large; | |
color: darkgreen; | |
padding: 0.5em | |
} |
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
<form oninput="robber.value = muggle.value"> | |
<table> | |
<tr><th>Muggle | |
<th>Räuber | |
<tr><td><textarea id="muggle" autsofocus>Test</textarea></td> | |
<td><textarea id="robber" readonly></textarea></td> | |
</table> | |
</form> |
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
CONSONANTS = "bcdfghjklmnpqrsßtvwxzBCDFGHJKLMNPQRSßTVWXZ"; | |
String.prototype.isConsonant = function isConsonant () { | |
return CONSONANTS.indexOf(this) != -1; | |
} | |
String.prototype.convertChar = function convertChar () { | |
return this.isConsonant() ? this + "o" + this.toLowerCase() : this; | |
} | |
function toRobberspeak () { | |
return this.split("").map(function (char) { | |
return char.convertChar(); | |
}).join(""); | |
} |
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
{"view":"split","fontsize":"90","seethrough":"","prefixfree":"1","page":"html"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment