Created
September 7, 2012 15:36
-
-
Save nikolas/3667229 to your computer and use it in GitHub Desktop.
js functions for fortchan.org
This file contains hidden or 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
function d() { | |
return Math.random() >= 0.5; | |
} | |
function myLoop() { | |
var interval = setInterval(function() { | |
var str = '`~=~`~=+=~`~``~=~`~-+==~`~-_-~`:'; | |
if ($('body')) { | |
var str = $('body').text(); | |
} | |
var newStr = ''; | |
for (var i = 0, len = str.length; i < len; i++) { | |
var ch = str[i]; | |
if (d()) { | |
newStr += (ch + ' '); | |
} else { | |
newStr += ch; | |
} | |
} | |
$.post('/branches', { 'leaf[content]': newStr }); | |
}, 500); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment