Censorship.

This commit is contained in:
Vasco Lavos committed 2014-06-09 15:30:20 +01:00
1 parent b7313f0354
commit 690ad40828
2 files changed
+18 -2

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@ r1.0 48
*<i>*sigh*</i>
r1.0 47
*Added a config option to disable the references in the flowers' tooltips. <i>Though, be warned, I hate you if you do <3</i>
*Added a tease for (redacted).
*Added a tease for <span class="censored">----------</span>.
*Added two new generating flowers, the Entropinnyum and the Kekimurus. <i>Help, I'm running out of names :c</i>
*Buffed the output of the Rosa Arcana.
*Fixed Composite lenses not being localized.
+17 -1
View File
@@ -1,6 +1,9 @@
const censorChars = 'abcdefghijklmnopkrstuvwxyz';
var animating = false;
$(function() {
setInterval(changeCensor, 100);
var remove = $.cookie('show-footer');
if(remove === 'true') {
$('#footer').css( { bottom: '-50px' } );
@@ -47,4 +50,17 @@ $(".hashlink").click(function() {
if(hash == 'Back to top')
$('html, body').animate({ scrollTop: 0 }, 500);
else $('html, body').animate({ scrollTop: $("#" + hash + "-fake").offset().top - 100 }, 1000);
});
});
function changeCensor() {
$('.censored').each(function() {
$(this).text(randomStr($(this).text().length));
});
}
function randomStr(length) {
var str = '';
for(var i = 0; i < length; i++)
str += censorChars.charAt(Math.floor(Math.random() * censorChars.length));
return str;
}