NewsmaxTV

  • ‘ +
    ” + d + ” +
  • ‘; } $.every(s, perform (i, v) { $(‘.schedule-tabs’).append(template(_this.days[new Date(i).getDay()], runonce)); runonce = true; }); }, populate: perform (s) { var _this = this, runonce = false, rely=0; perform template(o, j) { var cl = (j % 2) ? ” : ‘striped’; cl += (j >= _this.restrict) ? ‘ conceal’ : ”; return ” + ‘

    ‘ + second(o.datetime).format(‘LT’) + ‘

    ‘ + ‘

    ‘ + o.title + ‘

    ‘ + ‘

    ‘ + o.subtitle + ‘

    ‘ + ‘

    ‘ + o.description + ‘

    ‘ + ”; } perform loadMoreTemplate() { return ‘

    ‘ +
    ‘+

    ‘; } perform showLessTemplate() { return ‘

    ‘ +
    ‘+

    ‘;
    }

    $.every(s, perform (i, v) {
    var d = _this.days[new Date(i).getDay()].toLowerCase();
    $.every(v, perform (j, o) {

    var nmSubtitle = “”;
    if (o.Episode == o.Program) {
    nmSubtitle = “”;
    } else {
    nmSubtitle = o.Episode;
    }
    var program = { datetime: o.ShowDateTime, title: o.Program, description: o.Description, subtitle: nmSubtitle };
    $(‘#sched-‘ + d).append(template(program, j));
    (_this.restrict == j+1) ? $(‘#sched-‘ + d).append(loadMoreTemplate) : [];
    (v.length-1 == j && j>_this.restrict) ? $(‘#sched-‘ + d).append(showLessTemplate) : [];

    if (!runonce) {
    $(‘#sched-‘ + d).addClass(‘in lively’);
    $(doc).set off(‘programEvent’, program);
    }
    runonce = true;
    });
    });
    },

    scrollUp: perform () {
    var goal = $(‘#schedule-section’);
    $(‘html, physique’).animate({
    scrollTop: goal.offset().prime – 100
    }, 1000);
    },

    init: perform (ms) {
    var _this = this;
    var hash = (ms) ? “?h=” + ms : “”;
    $.getJSON(_this.endpoint + hash, perform (information) {
    $.every(information, perform (i, v) { _this.parse(v); });
    _this.createSchedule();
    _this.createTabs(_this.information);
    _this.populate(_this.information);
    });

    }
    };

    // Initialize
    schedule.init();

    // Intervals
    var everyInterval = 1860000; // 31 Minutes
    var nextInterval = Math.abs(second().endOf(‘hour’).toDate() – second().toDate());
    window.setTimeout(perform() {
    schedule.init(Date.now());

    window.setInterval(perform() {
    schedule.init(Date.now());
    }, everyInterval);

    }, nextInterval);

    $(d).prepared(perform () {

    perform showmore(btn) {
    $(btn).addClass(‘conceal’);
    $(btn).mum or dad().siblings().removeClass(‘conceal’);
    $(btn).mum or dad().siblings().discover(‘.sched-less’).removeClass(‘conceal’);
    }

    perform showless(btn) {
    $(btn).addClass(‘conceal’);
    schedule.scrollUp();
    $(btn).mum or dad().siblings().discover(‘.sched-more’).removeClass(‘conceal’);
    $(btn).mum or dad().siblings().discover(‘.sched-more’).mum or dad().nextAll().addClass(‘conceal’);
    }

    $(‘physique’).on(‘click on’, ‘.sched-more’, perform (e) {
    showmore(e.goal);
    });

    $(‘physique’).on(‘click on’, ‘.sched-less’, perform (e) {
    showless(e.goal);
    });
    });

    })(window.jQuery, this);
    “, ““] }); })(window.jQuery); ]]>

    Get Newsmax in your cable, name us at: 844-500-6397

    Get free Newsmax TV alerts for breaking information, newest exhibits, and company

     

    Privateness: We by no means share your e-mail.

    Leave a Reply

    Your email address will not be published. Required fields are marked *