/*see archive.js in same dir for source*/ /* Copyright(c)2008-2017 Internet Archive. Software license AGPL version 3. */ 'use strict'; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } (function jquery_no_conflict($) { // convenient, no? Stateless function, global to all Play objects // eslint-disable-next-line no-console var log = location.host.substr(0, 4) !== 'www-' ? function () {} : console.log.bind(console); // class memnonic: Archive JS var AJS = function () { function AJS() { _classCallCheck(this, AJS); } _createClass(AJS, null, [{ key: 'tvAD', // NOTE: needs to stay in sync w/ archive.less /* global archive_analytics jwplayer */ /* eslint no-underscore-dangle: ["error", { "allow": ["_modal_add"] }]*/ value: function tvAD(elm) { var in_show = $(elm).parents('.shows'); var id = void 0; var chan = void 0; var show = void 0; if (in_show.length) { // see if we've already gotten and displayed the "Air date" section... var opened = $(elm).parent().find('.shows'); if (opened.length) { // ... yes, simply close/open it opened.toggle(); return false; } chan = in_show.attr('data-chan'); show = $(elm).text(); } else { chan = $(elm).text(); id = 'menu-chan-'.concat(chan); var div = $('#' + id); if (div.length) { div.toggle(); return false; } } var url = location.href + '?channel=' + chan; if (in_show.length) url += '&program='.concat(encodeURIComponent(show)); log(url); $.get(url, function (htm) { if (in_show.length) { $(elm).parent().append('