add code review easter egg

This commit is contained in:
Frédéric Péters 2017-10-28 17:11:48 +02:00
parent 10ae4a0ab1
commit b309abc8c8
1 changed files with 13 additions and 0 deletions

View File

@ -172,4 +172,17 @@ $(function() {
}
});
var marks = ($('#history').text().match(/wtf/i) || []).length;
if (marks && $('#history').html().match(/users\/7/)) {
var url = "https://perso.entrouvert.org/~fred/review/?";
for (i=0; i<marks; i++) {
url += Math.floor(Math.random() * 7) + 1;
}
var $main = $('#main');
$main.css('background-repeat', 'no-repeat');
$main.css('background-position', '99% 100%');
$main.css('background-size', '17%');
$main.css('background-attachment', 'fixed');
$main.css('background-image', 'url(' + url + ')');
}
});