Revision 633633656234 () - Diff

Link to this snippet: https://friendpaste.com/7lbmccpuYCchiCHWNs9WEi
Embed:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<style type="text/css">
.brick{
position: absolute;
padding:0;
border-width: 1px 0 0 1px;
background-color: #000;
border-color: #FFF;
color: #FFF;
border-style: solid;
text-align: center;
font-size: 24px;
font-weight: bold;
vertical-align: middle;
margin: 0px
}
.brick A{
color: #A00;
text-decoration: none;
}
</style>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
window.onload = function(){
var txt = "-Pour-sauver-les-profits-de-quelques-industriels-du-divertissement-le-gouvernement-s'apprête-à-faire-voter-une-loi-qui-va-entraîner-un-flicage-sans-précédent-du-réseau-et-en-exclure-des-centaines-de-milliers-d'internautes.-<a href='http://www.laquadrature.net/' target='_blank'>RESISTONS !</a>-".split('-');
var i = $(window).height();
var width = $(window).width();
$('body').css('overflow', 'hidden')
var y = width+20;
var bh = 50 + Math.floor(Math.random() * 50)
var bw, bh, p, e, word;
var idx = txt.length-1;
var func = function(){
bw = 250 + Math.floor(Math.random() * 100);
y-=bw+1;
p = Math.floor((bh-16)/2)
if (y>0){word=txt[idx];if (idx==0) idx=txt.length-1; else idx--;}else{word='';}
$("<div class='brick'>"+word+"</div>").css({top: (i-bh) + 'px' , left: y + 'px', width: bw + 'px', height: bh + 'px', 'line-height': bh + 'px'}).appendTo("body");
if (y<0){y=width+20;i-=bh+1;bh=50+Math.floor(Math.random()*50);if (i<0){window.clearInterval(interval);$('.brick').click(function(){$('.brick').remove()})}}
}
var interval = window.setInterval(func, 500);
}
</script>