d'oh lol this is the most annoying april fools prank I've witnessed on Codex! Good job guys
Yeah, so far:
- comments disabled
- weird effects on buttons / disappearing buttons
- can't comment to statuses
- otters
- sound effects
Looking into the code, I can see this:
// April fools
var soundplayed = false;
var width = 0.1*($(window).width());
var height = 0.1*($(window).height());
function run() {
if(!soundplayed)
{
var audioElement = document.createElement('audio');
audioElement.setAttribute('src', 'http://www.neocodex.us/personal/shadowlink64/run.mp3');
audioElement.setAttribute('autoplay', 'autoplay');
soundplayed = true;
}
if($(this).css('position') != "absolute")
{
var position = $(this).offset();
$(this).css('position', 'absolute');
$(this).css('top', position['top'] + "px");
$(this).css('left', position['left'] + "px");
}
var curr_top = parseInt($(this).css('top').replace('px',''));
var curr_left = parseInt($(this).css('left').replace('px',''));
var top = Math.random() * height;
var left = Math.random() * width;
var new_top = parseInt(curr_top + top);
var new_left = parseInt(curr_left + left);
$(this).css('top', new_top + 'px').css('left', new_left + 'px');
}
$(document).ready(function() {
$('a').each(function() {
var randnum = parseInt(Math.random()*20);
if(randnum == 1)
{
$(this).mouseover(run);
}
});
});
random number gens and mp3 files oh my
Edit: Forgot the spoilers (lack of)
Edited by Artleyz, 01 April 2016 - 06:55 PM.