SLIDESHOW: Back The Blue, Black Lives Matter protests take place in West Peabody – The Salem News

'; oEngagementContainer_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4.append(sHTML_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4); } }); } // Build engagement set $.each(oResponse.assets, function(index) { if (index == 1 && sOriginID_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4 == null) { sOriginID_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4 = oResponse.assets[0].id; } // Display assets once origin is found // Find origin then begin displaying assets if (bFoundOrigin_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4 == true) { if (this.id == sOriginID_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4) { // Found orgin a second time. Stop gathering assets and kill next_url bStop_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4 = true; sNextUrl_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4 = null; oEngagementMore_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4.remove(); } else if (bStop_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4 == false && this.id != 'cd49a4b8-c62e-11ea-ac80-ef0d03c7afb4') { // Display asset var sHTML_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4 = ''; if (this.content.includes('engagement-asset') && iDisplayCount_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4 ' + this.content + ''; } } } else { if (this.id == sOriginID_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4) { // Origin found. Begin displaying assets bFoundOrigin_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4 = 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_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4 == true) { // Stored first id sFirstID_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4 = this.id; bFirstRun_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4 = false; } else if (this.id == sFirstID_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4) { // We've started again. Force origin sOriginID_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4 = sFirstID_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4; bFoundOrigin_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4 = true; } // end Fail-safe } } // Append engagement assets to container oEngagementContainer_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4.append(sHTML_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4); // Stop traversing asset array if (iDisplayCount_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4 >= iMaxDisplay_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4) { bStop_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4 = true; return false; } }); // Include block_id on newly added list items oEngagementContainer_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4.find('.engagement-item.original').each(function() { var sHref_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4 = scrubURL($(this).find("a.centered-content-link").attr("href")); if(sHref_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4!="javascript:void(0)"){ // Add content discovery tracking sHref_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4 += '#tncms-source=endcard-gallery'; // Add to image and headlines links $(this).removeClass('original').find("a.centered-content-link").attr("href", sHref_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4); } }); // Check next URL if (sNextUrl_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4 && bStop_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4 == false) { // if origin hasn't been found yet and we hit next_url. Trigger the set to pull in again. if (bFoundOrigin_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4 == false) { // No origin yet. Call the populate function __tnt.engagement.assets["cd49a4b8-c62e-11ea-ac80-ef0d03c7afb4"].populate(sNextUrl_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4); } else { // Append sNextUrl_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4 to engagement set oEngagementContainer_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4.append(''); if (iDisplayCount_cd49a4b8_c62e_11ea_ac80_ef0d03c7afb4

Read more here:

SLIDESHOW: Back The Blue, Black Lives Matter protests take place in West Peabody - The Salem News

Related Posts

Comments are closed.