com web/php: Zee-a Swedish cheff mekes un iester eegg: js/common.js
| From: | Peter Cowburn | Date: | Sat, 06 Sep 2014 20:12:23 +0000 |
| Subject: | com web/php: Zee-a Swedish cheff mekes un iester eegg: js/common.js | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-19899@lists.php.net to get a copy of this message | ||
Commit: 4f389c0b02f944c953b5f4099d86a42e763882f2
Author: Peter Cowburn <salathe@php.net> Sat, 6 Sep 2014 21:12:23 +0100
Parents: af3480bd5a2413b6d2e55edebcfdfc22dc69d43e
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=4f389c0b02f944c953b5f4099d86a42e763882f2
Log:
Zee-a Swedish cheff mekes un iester eegg
Changed paths:
M js/common.js
Diff:
diff --git a/js/common.js b/js/common.js
index a32a647..31216f5 100755
--- a/js/common.js
+++ b/js/common.js
@@ -99,6 +99,20 @@ Mousetrap.bind("g n", function() {
window.location.href = link;
}
});
+Mousetrap.bind("b o r k", function() {
+ var bork = function(text) {
+ var subs = [[/a([nu])/g, 'u$1'], [/A([nu])/g, 'U$1'], [/a\B/g,
'e'], [/A\B/g, 'E'], [/en\b/g, 'ee'], [/\Bew/g, 'oo'],
[/\Be\b/g, 'e-a'], [/\be/g, 'i'], [/\bE/g, 'I'], [/\Bf/g,
'ff'], [/\Bir/g, 'ur'], [/(\w*?)i(\w*?)$/g, '$1ee$2'], [/\bow/g,
'oo'], [/\bo/g, 'oo'], [/\bO/g, 'Oo'], [/the/g, 'zee'],
[/The/g, 'Zee'], [/th\b/g, 't'], [/\Btion/g, 'shun'], [/\Bu/g,
'oo'], [/\BU/g, 'Oo'], [/v/g, 'f'], [/V/g, 'F'], [/w/g,
'w'], [/W/g, 'W'], [/([a-z])[.]/g, '$1. Bork Bork Bork!']];
+ for (var i = 0; i < subs.length; i++) {
+ text = text.replace(subs[i][0], subs[i][1]);
+ }
+ return text;
+ };
+ $('*').contents().filter(function() {
+ return this.nodeType === 3 && /[^\t\n\r ]/.test(this.textContent);
+ }).each(function(_, el) {
+ el.textContent = bork(el.textContent);
+ });
+});
var FIXED_HEADER_HEIGHT = 50;
function cycle(to, from) {