User:Stl1234/wikia.js


 * (function ($) {

$('ul.comments li.SpeechBubble .permalink').each(function{       var lastSegment = $this.href.text.split('/').pop;        var datePart = lastSegment.split('-').slice(0,8); // YYYYMMDD        var year = datepart.slice(0,4);        var month = datepart.slice(4,6);        var day = datepart.slice(6,8);        var currentDate = new Date;        var commentDate = new Date(year, month - 1, day ); // months count from 0        var diffMilliseconds = currentDate.getTime - commentDate.getTime;        var diffDays = Math.floor(diffMilliseconds / 1000 / 60 / 60 / 24);        if (diffDays > 365)        {            $this.Siblings('div.buttons').Children('button.article-comm-reply').remove;        }        }); })(this.jQuery);