function checkNotification()

in www/static/js/index.js [48:65]


function checkNotification() {
    var dates = [];
    if (lastVisit != "") {
        {% for post in site.posts %}
        dates.push('{{ post.date | date_to_rfc822 }}');{% endfor %}
    }
    var new_blog_count = 0;
    for(var i = 0; i < dates.length ; i++) {
        var blog_time = new Date(dates[i]).getTime();
        if(blog_time > lastVisit) {
            new_blog_count++;
        }
        else {
            break;
        }
    }
    return new_blog_count;
}