Talking local politics over coffee

You have permission to edit this article.

Edit

76°

Partly Cloudy

site-logo

featured

Analysis

Analysis: Talking local politics over coffee

Miles Layton is region editor of APG Media-Ohio.

Recommended for you

‘; if ($(content).html() == “”) { row = ”; } return row; }; if (typeof oResponse.next_url == ‘undefined’) { // URL supplied is no good. Revert to original URL sNextUrl = sOriginURL; } else { sNextUrl = scrubURL(oResponse.next_url); } // Manage response if (typeof oResponse.assets != ‘undefined’ && oResponse.assets.length > 0) { // Remove old more data $(“#infinite-more”).remove(); // Build infinity set $.each(oResponse.assets, function(index) { // Display assets once origin is found if (bFoundOrigin == true) { if (this.id == sOriginID) { bInfiniStop = true; sNextUrl = null; $(“#infinite-more”).remove(); } else if (bInfiniStop == false && this.id != ‘fd28d2f2-1a5f-11ee-a3fc-07056a29283f’) { // Display asset var sHTML = ”; if (this.content) { if (sInfinityType == ‘summary_sticky_siderail’) { if (counter == 0) { sHTML += displayRegion(counter); } counter++; sHTML += ‘

‘ + this.content + ‘

‘; if (rPositions.indexOf(counter) > -1) { sHTML += displayRegion(counter); } } else { if (counter == 0) { sHTML += displayRegion(counter); } counter++; sHTML += ‘

‘ + this.content + ‘

‘ bShowAd = false; } else { bShowAd = true; } sHTML += ‘

‘; if (bShowAd == true) { // Show advertisement sHTML += ” bShowAd = false; } else { bShowAd = true; } sHTML += ‘

‘; if (rPositions.indexOf(counter) > -1) { sHTML += displayRegion(counter); } } } } } else { if (this.id == sOriginID) { // Origin found. Begin displaying assets bFoundOrigin = true; } else { // Origin found is false. Skip asset // Fail-safe in case origin is not present in set. This can be removed when origin is fixed. if (bFirstRun == true) { // Stored first id sFirstID = this.id; bFirstRun = false; } else if (this.id == sFirstID) { // We’ve started again. Force origin sOriginID = sFirstID; bFoundOrigin = true; } // end Fail-safe } } // Append infinity set to container $(“#infinite-container”).append(sHTML); }); // Include block_id on newly added list items $(‘#infinite-container .infinite-item.original’).each(function() { var sHref = scrubURL($(this).find(“.card-headline a”).attr(“href”)); // Add to image and headlines links $(this).removeClass(‘original’) .find(“.card-headline a, .image a”) .attr(“href”, sHref + “#tncms-source=infinity-scroll-summary-siderail-next”); }); // Check next URL if (sNextUrl) { // if origin hasn’t been found yet and we hit next_url. Trigger the set to pull in again. if (bFoundOrigin == false) { // No origin yet. Call the populate function populateInfinitySet(sNextUrl); } else { // Append sNextUrl to infinity set $(“#infinite-container”).append(‘
‘); } } // Vanilla Ad waypoint and handler to insert ads next to summary var waypoint = new IntersectionObserver(function(infinityAdUnits) { Array.prototype.slice.call(infinityAdUnits).forEach(function(infinityAdUnit) { if (infinityAdUnit.intersectionRatio > 0) { infinityAdUnit.target.classList.remove(’empty’); var newIframe = infinityAd(); if (infinityAdUnit.target.childNodes.length <= 0) { infinityAdUnit.target.append(newIframe); } } }); }); var infinityAds = document.querySelectorAll(‘.infinity-ad.empty’); Array.prototype.slice.call(infinityAds).forEach(function(infinityAd) { waypoint.observe(infinityAd); }); if (sInfinityType == ‘summary_sticky_siderail’) { __tnt.regions.stickySide.determineStick($(‘#sticky-right-rail’), $(‘#sticky-right-rail-spacer’), ‘siderail’); } } else { // Empty asset set returned. Go back in for a real set populateInfinitySet(sNextUrl); } }); } var infWaypoint = new IntersectionObserver(function(infContainer) { if (infContainer[0].intersectionRatio > 0) { if (!bInfiniStop) { // Log waypoint hit event __tnt.trackEvent({‘category’:’infinity-scroll’,’action’:’request’, ‘label’:’assets requested’, ‘value’: true}); var nextURL = $(‘#infinite-more’).data(‘next-url’); populateInfinitySet($(‘#infinite-more’).data(‘next-url’)); } } }); var infinityContainer = document.getElementById(‘infinite-container’); infWaypoint.observe(infinityContainer); // Infinity ad function infinityAd() { var newIframe = document.createElement(‘iframe’); newIframe.scrolling = ‘no’; newIframe.src = ‘https://www.athensnews.com/tncms/block/1403161/?disableTNStatsTracker=1’; return newIframe; } // Rewrite URL to for preview function scrubURL(sURL) { if (typeof sURL != ‘undefined’){ return sURL; } }

‘; if ($(content).html() == “”) { row = ”; } return row; }; if (typeof oResponse.next_url == ‘undefined’) { // URL supplied is no good. Revert to original URL sNextUrl = sOriginURL; } else { sNextUrl = scrubURL(oResponse.next_url); } // Manage response if (typeof oResponse.assets != ‘undefined’ && oResponse.assets.length > 0) { // Remove old more data $(“#infinite-more”).remove(); // Build infinity set $.each(oResponse.assets, function(index) { // Display assets once origin is found if (bFoundOrigin == true) { if (this.id == sOriginID) { bInfiniStop = true; sNextUrl = null; $(“#infinite-more”).remove(); } else if (bInfiniStop == false && this.id != ‘fd28d2f2-1a5f-11ee-a3fc-07056a29283f’) { // Display asset var sHTML = ”; if (this.content) { if (sInfinityType == ‘summary_sticky_siderail’) { if (counter == 0) { sHTML += displayRegion(counter); } counter++; sHTML += ”; if (rPositions.indexOf(counter) > -1) { sHTML += displayRegion(counter); } } else { if (counter == 0) { sHTML += displayRegion(counter); } counter++; sHTML += ”; if (rPositions.indexOf(counter) > -1) { sHTML += displayRegion(counter); } } } } } else { if (this.id == sOriginID) { // Origin found. Begin displaying assets bFoundOrigin = true; } else { // Origin found is false. Skip asset // Fail-safe in case origin is not present in set. This can be removed when origin is fixed. if (bFirstRun == true) { // Stored first id sFirstID = this.id; bFirstRun = false; } else if (this.id == sFirstID) { // We’ve started again. Force origin sOriginID = sFirstID; bFoundOrigin = true; } // end Fail-safe } } // Append infinity set to container $(“#infinite-container”).append(sHTML); }); // Include block_id on newly added list items $(‘#infinite-container .infinite-item.original’).each(function() { var sHref = scrubURL($(this).find(“.card-headline a”).attr(“href”)); // Add to image and headlines links $(this).removeClass(‘original’) .find(“.card-headline a, .image a”) .attr(“href”, sHref + “#tncms-source=infinity-scroll-summary-siderail-next”); }); // Check next URL if (sNextUrl) { // if origin hasn’t been found yet and we hit next_url. Trigger the set to pull in again. if (bFoundOrigin == false) { // No origin yet. Call the populate function populateInfinitySet(sNextUrl); } else { // Append sNextUrl to infinity set $(“#infinite-container”).append(”); } } // Vanilla Ad waypoint and handler to insert ads next to summary var waypoint = new IntersectionObserver(function(infinityAdUnits) { Array.prototype.slice.call(infinityAdUnits).forEach(function(infinityAdUnit) { if (infinityAdUnit.intersectionRatio > 0) { infinityAdUnit.target.classList.remove(’empty’); var newIframe = infinityAd(); if (infinityAdUnit.target.childNodes.length <= 0) { infinityAdUnit.target.append(newIframe); } } }); }); var infinityAds = document.querySelectorAll(‘.infinity-ad.empty’); Array.prototype.slice.call(infinityAds).forEach(function(infinityAd) { waypoint.observe(infinityAd); }); if (sInfinityType == ‘summary_sticky_siderail’) { __tnt.regions.stickySide.determineStick($(‘#sticky-right-rail’), $(‘#sticky-right-rail-spacer’), ‘siderail’); } } else { // Empty asset set returned. Go back in for a real set populateInfinitySet(sNextUrl); } }); } var infWaypoint = new IntersectionObserver(function(infContainer) { if (infContainer[0].intersectionRatio > 0) { if (!bInfiniStop) { // Log waypoint hit event __tnt.trackEvent({‘category’:’infinity-scroll’,’action’:’request’, ‘label’:’assets requested’, ‘value’: true}); var nextURL = $(‘#infinite-more’).data(‘next-url’); populateInfinitySet($(‘#infinite-more’).data(‘next-url’)); } } }); var infinityContainer = document.getElementById(‘infinite-container’); infWaypoint.observe(infinityContainer); // Infinity ad function infinityAd() { var newIframe = document.createElement(‘iframe’); newIframe.scrolling = ‘no’; newIframe.src = ‘https://www.athensnews.com/tncms/block/1403161/?disableTNStatsTracker=1’; return newIframe; } // Rewrite URL to for preview function scrubURL(sURL) { if (typeof sURL != ‘undefined’){ return sURL; } }

Original Article

Leave a Comment