25 lines
464 B
HTML
25 lines
464 B
HTML
<!-- redirector to send the user to the random message -->
|
|
<html>
|
|
<body>
|
|
<script>
|
|
var data = {DATA};
|
|
|
|
function rnd(max) {
|
|
return Math.floor(Math.random()*max);
|
|
}
|
|
|
|
var dt = new Date()
|
|
|
|
var t = (dt.getYear()+1900)+"Q"+(Math.floor(dt.getMonth()/3)+1);
|
|
var msgs = data[t] || [];
|
|
|
|
var slot = rnd(4);
|
|
if (slot<msgs.length) {
|
|
var m = rnd(msgs[slot]);
|
|
var p = t+"-"+slot+"_"+m+".html"
|
|
location.href = p;
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|