(function() { function bxBootstrap() { var re = /bot|crawl|slurp|spider|mediapartners|headlesschrome|snap-prefetch|remotasks|woorank|uptime\.com|facebookexternalhit|facebookcatalog/i; if (re.test(navigator.userAgent) || navigator.userAgent == '') { return; } if (!(window.bouncex&&bouncex.website)) { var pushedData = []; if(window.bouncex && bouncex.push && bouncex.length){ pushedData = bouncex; } window.bouncex = {}; bouncex.pushedData = pushedData; bouncex.website = {"id":2045,"name":"NY Post | NY Post","cookie_name":"bounceClientVisit2045","domain":"NYPost.com","ct":"fp_local_storage","ally":0,"ei":0,"tcjs":"","cjs":"/* enable.feature./nope/DISABLE_RELOAD_CAMPAIGNS_V2 */\n/* enable.feature.COMPLIANCE_REFACTOR_ENABLED */\n/* enable.feature.TCF_ENABLE_NEW_PURPOSE_LIST */\n/* enable.feature.DISABLE_IOS_ABSOLUTE */\n\n// (function() {\n// // SSM 08/16/18 0:20:14 PM https://www.wrike.com/open.htm?id=262056569\n// if (bouncex.website.gbi_enabled) {\n// clearInterval(bouncex.testInterval);\n// bouncex.testInterval = setInterval(function(){\n \n// if (bouncex.vars.pbb_response === false) {\n// if (window.bxgraph && bxgraph.IDs && bxgraph.IDs.deviceID) {\n \n// clearInterval(bouncex.testInterval);\n \n// jQuery.ajax({\n// url: \"https://pbb.bouncex.net/bxid/\" + bxgraph.IDs.deviceID,\n// data: {\"website\":'+bouncex.website.id+'},\n// success: function(e) {\n// var elig = bouncex.parseJSON(e, {eligibility:\"\"}).eligibility || \"not\";\n// bouncex.setVarAndReload('pbb_response', elig);\n// }\n// });\n// }\n// } else {\n// clearInterval(bouncex.testInterval);\n// }\n// }, 200);\n \n// } else {\n// bouncex.setVarAndReload('pbb_response', 'not');\n// }\n// })();\n\n/* enable.feature.ENABLE_IDENTITYHUB_BSW */\n/* enable.feature.CONTEXTUAL_ANALYTICS */\n/* enable.feature.DEPLOYMENT_TYPE_REFACTOR */\n/* enable.feature.DISABLE_IOS_ABSOLUTE */\nbouncex.CONSOLIDATE_BIDS = true;\n\nbouncex.recirc._requestFeed = function(ajaxOptions) {\n\tvar feedUrl = bouncex.vars.section_name ? 'https://dev-api.nypost.com/v1/parsely/nypost/top-stories?format=xml&limit=10§ion='+bouncex.vars.section_name : 'https://dev-api.nypost.com/v1/parsely/nypost/top-stories?format=xml&limit=10';\n\tthis.log(null, 'requesting articles from '+feedUrl);\n\tjQuery.ajax({\n\t\tmethod: \"GET\",\n\t\turl: feedUrl,\n\t\tdataType: 'xml',\n\t\theaders: {\n\t\t\t\"Authorization\":\"Basic Ym91bmNleDp4TkVEQmVYelo4QTQtb0hsa0lNNEpXQU9WVEZEMHZLNGMtN0lMSDU2RW9vY2MxVHJnOA==\"\n\t\t},\n\t\tcomplete: function(response, status) {\n\t\t\tvar responseObj = {responseXML: response.responseText};\n\t\t\tbouncex.recirc._handleResponse(responseObj, status);\n\t\t}\n\t});\n};\n\nbouncex.recirc.addSettings({\n\tenabled: true,\n\tfeedFormat: 'xml',\n\tfeedUrl: 'https://dev-api.nypost.com/v1/parsely/nypost/top-stories?format=xml&limit=10',\n\tresponseParser: function(response) {\n\t\tvar xmlResponse = jQuery.parseXML(response);\n\t\tvar $doc = jQuery(xmlResponse);\n\t\tvar $articles = $doc.find('item');\n\t\tvar articles = [];\n\t\t$articles.each(function() {\n\t\t\tvar $article = jQuery(this);\n\t\t\tvar maxHeadlineLength = 56;\n\t\t\tvar fullHeadline = $article.find('title').first().text();\n\t\t\tvar truncatedHeadlineArray = fullHeadline.substring(0, maxHeadlineLength - 4).split(' ');\n\t\t\tvar headline = fullHeadline.length < maxHeadlineLength ? fullHeadline : truncatedHeadlineArray.slice(0, truncatedHeadlineArray.length - 1).join(' ') + ' ...';\n\n\t\t\tvar link = $article.find('link').first().text().trim();\n\t\t\tvar image = $article.find('image').first().text().trim();\n\t\t\tvar section = $article.find('section').first().text().trim();\n\n\t\t\tvar article = {\n\t\t\t\theadline: headline,\n\t\t\t\tlink: link,\n\t\t\t\timage: image,\n\t\t\t\tsection: section\n\t\t\t};\n\t\t\tarticles.push(article);\n\t\t});\n\t\treturn articles;\n\t}\n});\n\nbouncex.recirc.init();","force_https":false,"waypoints":false,"content_width":0,"gai":"","swids":"","sd":0,"ljq":"auto","campaign_id":0,"is_preview":false,"aco":{"first_party_limit":"3500","local_storage":"1"},"cmp":{"gdpr":0,"gmp":0,"whitelist_check":0},"burls":[{"prop":"contains","val":"/video"},{"prop":"contains","val":"/dispatch"},{"prop":"contains","val":"/author"},{"prop":"contains","val":"/careers"},{"prop":"contains","val":"/customer-service"},{"prop":"contains","val":"/contact"},{"prop":"contains","val":"/mobile-apps"},{"prop":"contains","val":"/rssfeeds"},{"prop":"contains","val":"/terms"},{"prop":"contains","val":"/privacy"},{"prop":"contains","val":"/tips"}],"ple":false,"fbe":true,"ffs":"","mas":1,"map":1,"gar":true,"ete":0,"ettm":true,"etjs":"","dge":true,"bxidLoadFirst":false,"pie":true,"cme":false,"gbi_enabled":1,"bpush":false,"pt":{"article":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.gtmLookup('page_type') === 'article' || document.querySelectorAll('body.article-template-default').length > 0;"}]]},"category":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.gtmLookup('page_type') === 'Section' || document.querySelectorAll('body.archive').length > 0;"}]]},"gallery":{"testmode":true,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"jQuery('.slide-image').length > 0;"}]]},"home":{"testmode":true,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"window.location.pathname === \"/\" && window.location.href.indexOf('/?s=') == -1;"}]]},"search":{"testmode":true,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"window.location.href.indexOf('/?s=') > -1 || window.location.href.indexOf('/search') > -1;"}]]},"test":{"testmode":true,"val":[[{"activation":"current_page_url","prop":"contains"}]]}},"els":{"amp_endcap":".tag-list","encore":"#page-footer, #colophon.site-footer","endcap":".membership-comments-module","infeed":".entry-content > p:eq(3) ~ p + p, .entry-content > p:eq(3) ~ p + .bxc + p","infeed_dupe":".entry-content p:contains(3)","infeed_dupe7":".entry-content p:contains(7)","masthead":"#main"},"vars":[{"name":"sponsorship_present","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n /* https://www.wrike.com/open.htm?id=137435095 */\n /****** config -- edit here! ******/\n var targetSizes = [\n {'width':970,'height':250},\n {'width':970,'height':90},\n {'width':728,'height':90},\n {'width':300,'height':250},\n {'width':300,'height':600}\n ];\n var suppressAdvertiserIds = [];\n var suppressLineItemIds = [];\n var suppressLabelIds = [];\n var safeAdvertiserIds = ['36786095'];\n var safeLineItemIds = [];\n var safeLabelIds = [];\n /**** end config ****/\n function getSizeOfSlots(slots) {\n var numSlots = slots.length;\n var slotSizes = [];\n for (var i = 0; i < numSlots; i++) {\n var slot = slots[i];\n var width = '';\n var height = '';\n if (slot.ic && typeof slot.ic._width_ !== 'undefined' && typeof slot.ic._height_ !== 'undefined') {\n width = slot.ic._width_;\n height = slot.ic._height_;\n }\n slotSizes.push({'width':width,'height':height});\n }\n return slotSizes;\n }\n function returnSlotIndexesOfTargetSizeMatches(targetSizes,slotSizes) {\n var numTargetSizes = targetSizes.length;\n var numSlotSizes = slotSizes.length;\n var indexesOfMatchingSlots = []; \n for (var i = 0; i < numTargetSizes; i++ ) {\n var targetHeight = targetSizes[i].height;\n var targetWidth = targetSizes[i].width;\n for (var j = 0; j < numSlotSizes; j++) {\n var slotHeight = slotSizes[j].height;\n var slotWidth = slotSizes[j].width;\n if (targetHeight == slotHeight && targetWidth == slotWidth) {\n indexesOfMatchingSlots.push(j);\n }\n }\n }\n return indexesOfMatchingSlots;\n }\n function getResponseInformationFromSlots(slots) {\n var advertiserIds = [],\n lineItemIds = [],\n labelIds = [];\n var allSlotsEmpty = true;\n slots.each(function(i,slot){\n var info = slot.getResponseInformation();\n if(info){\n info.advertiserId?advertiserIds.push(info.advertiserId.toString()):advertiserIds.push('');\n info.lineItemId?lineItemIds.push(info.lineItemId.toString()):lineItemIds.push('');\n info.labelIds?labelIds.push(info.labelIds.toString()):labelIds.push('');\n allSlotsEmpty = false;\n } else {\n advertiserIds.push('');\n lineItemIds.push('');\n labelIds.push('');\n }\n });\n if (allSlotsEmpty) {\n return false;\n } else {\n return {'advertiserIds':advertiserIds,'lineItemIds':lineItemIds,'labelIds':labelIds};\n }\n }\n function checkListInclusion(definedList, slotList) {\n var definedListLength = definedList.length;\n var slotListLength = slotList.length;\n for (var i = 0; i < definedListLength; i++ ) {\n for (var j = 0; j < slotList.length; j++) {\n if (definedList[i] == slotList[j]) {\n return true;\n }\n }\n }\n return false;\n }\n if (window.googletag && googletag.apiReady && googletag.pubadsReady && typeof window.jQuery == 'function') {\n if (window.bouncex.apiChecked) {\n return bouncex.vars.sponsorship_present;\n } else {\n var adSlots = jQuery(googletag.pubads().getSlots());\n var responseInformation = getResponseInformationFromSlots(adSlots);\n if (!responseInformation) {\n if (!bouncex.website.gbi_enabled) {\n window.bouncex.apiChecked = true;\n return 'disabled';\n }\n return 'not_ready';\n }\n window.bouncex.apiChecked = true;\n var suppressionAdvertiserId = checkListInclusion(suppressAdvertiserIds, responseInformation.advertiserIds);\n var suppressionLineItemId = checkListInclusion(suppressLineItemIds, responseInformation.lineItemIds);\n var suppressionLabelId = checkListInclusion(suppressLabelIds, responseInformation.labelIds);\n if (suppressionAdvertiserId || suppressionLineItemId || suppressionLabelId) {\n return true;\n }\n var safeAdvertiserId = checkListInclusion(safeAdvertiserIds, responseInformation.advertiserIds);\n var safeLineItemId = checkListInclusion(safeLineItemIds, responseInformation.lineItemIds);\n var safeLabelId = checkListInclusion(safeLabelIds, responseInformation.labelIds);\n if (safeAdvertiserId || safeLineItemId || safeLabelId) {\n return false;\n }\n var adSlotSizes = getSizeOfSlots(adSlots);\n var slotsOfTargetSize = returnSlotIndexesOfTargetSizeMatches(targetSizes, adSlotSizes);\n if (slotsOfTargetSize.length < 2) {\n return false;\n } else {\n var firstSlotAdvertiserId = responseInformation.advertiserIds[slotsOfTargetSize[0]];\n var secondSlotAdvertiserId = responseInformation.advertiserIds[slotsOfTargetSize[1]];\n return (firstSlotAdvertiserId == secondSlotAdvertiserId);\n }\n }\n } else {\n return 'not_ready';\n }\n})()","trigger":""},{"name":"section_name","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n\tvar section = bouncex.utils.gtmLookup('section') && bouncex.utils.gtmLookup('section').toLowerCase();\n\t\tif (section === \"real estate\") return \"real-estate\";\n\t\treturn section;\n})();","trigger":""},{"name":"author","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.byline').find('a').first().text() || false","trigger":""},{"name":"dfp_rblock","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n function check() {\n bouncex.dfp_loaded = false || bouncex.dfp_loaded;\n var slots = window.googletag && typeof googletag.pubads == 'function' && typeof googletag.pubads().getSlots == 'function'? googletag.pubads().getSlots() : [];\n var numSlots = slots.length;\n for (var i = 0; i < numSlots; i++) {\n var slotInfo = slots[i] && typeof slots[i].getResponseInformation == 'function'? slots[i].getResponseInformation() : false;\n if (slotInfo && slotInfo.lineItemId) {\n bouncex.dfp_loaded = true;\n if (bouncex.website.gbi.rblocks && bouncex.website.gbi.rblocks.indexOf(slotInfo.lineItemId) > -1) {\n return 'sponsor';\n }\n }\n }\n if (bouncex.dfp_loaded) {\n return 'allow';\n }\n return 'not_ready';\n }\n if (!bouncex.website.gbi_enabled) {\n return 'disabled';\n } else if (bouncex.dfp_loaded) {\n return null;\n } else if (window.googletag && googletag.apiReady && googletag.pubadsReady) {\n return check();\n }\n return 'fallback';\n})()","trigger":""},{"name":"pbb_response","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"primary_tag","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"window.dataLayer && window.dataLayer[0] && window.dataLayer[0].primary_tag;","trigger":"pageload"},{"name":"category_page","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.website.pts === 'category';","trigger":"pageload"},{"name":"article_page","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.website.pts === 'article';","trigger":"pageload"},{"name":"articles_loaded","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.recirc._articles.length > 0;","trigger":"pageload"},{"name":"gated_page","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function(){\n try {\n return window.googletag.pubads().getTargeting('page_type').join().toLowerCase().indexOf('gated-') > -1;\n } catch {\n return false\n }\n})();","trigger":"pageload"}],"dgu":"pixel.cdnwidget.com","dgp":false,"ba":{"enabled":0,"fbte":0},"biu":"assets.bounceexchange.com","bau":"api.bounceexchange.com","beu":"events.bouncex.net","ibx":{"tjs":"","cjs":"","miw":0,"mibcx":0,"te":0,"cart_rep":{"get":"","set":""},"ulpj":null,"cus":"","miw_exclude":"","enabled":0},"etjson":null,"osre":false,"osru":"osr.bounceexchange.com/v1/osr/items","checkDfp":true,"gamNetwork":"5850","spa":0,"spatm":1,"preinit_cjs":"","crs":{"integrations":null,"pageCount":null},"mat":0,"math":0,"cpnu":"coupons.bounceexchange.com","dfpcms":0,"sms":{"optm":"","eventSharing":false,"shqId":"","enabled":0},"pde":false,"fme":false,"fmx":"","uid2":false,"sdk":{"android":{"enabled":false,"enabledVersions":[],"eventModifications":null},"ios":{"enabled":false,"enabledVersions":[],"eventModifications":null}},"onsite":{"enabled":1},"ads":{"enabled":1},"pubs":{"enabled":1},"websdk":{"enabled":0,"devMode":0},"ga4_property_id":"","ga4_measurement_id":"","tag_state_domain":"api.bounceexchange.com"} ; if (bouncex.website && bouncex.website.ads) { bouncex.website.ads.IABPubAccountID = 2045; } bouncex.tag = 'tag3'; bouncex.$ = window.jQuery; bouncex.env = 'production'; bouncex.restrictedTlds = {"casl":{"ca":1},"gdpr":{"ad":1,"al":1,"at":1,"ax":1,"ba":1,"be":1,"bg":1,"by":1,"xn--90ais":1,"ch":1,"cy":1,"cz":1,"de":1,"dk":1,"ee":1,"es":1,"eu":1,"fi":1,"fo":1,"fr":1,"uk":1,"gb":1,"gg":1,"gi":1,"gr":1,"hr":1,"hu":1,"ie":1,"im":1,"is":1,"it":1,"je":1,"li":1,"lt":1,"lu":1,"lv":1,"mc":1,"md":1,"me":1,"mk":1,"xn--d1al":1,"mt":1,"nl":1,"no":1,"pl":1,"pt":1,"ro":1,"rs":1,"xn--90a3ac":1,"ru":1,"su":1,"xn--p1ai":1,"se":1,"si":1,"sj":1,"sk":1,"sm":1,"ua":1,"xn--j1amh":1,"va":1,"tr":1}}; bouncex.client = { supportsBrotli: 0 }; bouncex.assets = {"ads":"27166d3b6527a269bad237fea7e0ef3c","creativesBaseStyles":"a53944a2","gam_5850":"//assets.bounceexchange.com/assets/gam/5850/483f4529ef41f38ec13e0d5d1f674ffa.json","gpsAuction":"bbb80866120d17013073bb6d284cbd6b","inbox":"75060a85c1a4aebcc6f779b9e84db722","onsite":"abbdf7a49be9b52b097917b7b527b262","sms":"e39203556bab2366e56296ce42e974a7","websdk":"04cde0014774b7eb597770595769aab1"}; bouncex.push = function(pushData) { bouncex.pushedData.push(pushData); } var runtime = document.createElement('script'); runtime.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/runtime_c81e76ee00d795b1eebf8d27949f8dc5.js'); runtime.setAttribute('async', 'async'); bouncex.initializeTag = function() { var script = document.createElement('script'); script.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/main-v2_4b048f3d0cfb1030f90fec02949d8c38.js'); script.setAttribute('async', 'async'); document.body.appendChild(script); var deviceGraphScript = document.createElement('script'); deviceGraphScript.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/cjs_min_6ef1802500d8367a80105e664862d0d7.js'); deviceGraphScript.setAttribute('async', 'async'); var dgAttrs = [{"Key":"id","Value":"c.js"},{"Key":"async","Value":"true"},{"Key":"data-apikey","Value":"2^HIykD"},{"Key":"data-cb","Value":"bouncex.dg.initPostDeviceGraph"},{"Key":"data-bx","Value":"1"},{"Key":"data-fire","Value":"1"},{"Key":"data-adcb","Value":"bouncex.dg.getAdsOptStatus"}]; if (dgAttrs) { for (var i = 0; i < dgAttrs.length; i++) { deviceGraphScript.setAttribute(dgAttrs[i].Key, dgAttrs[i].Value); } } document.body.appendChild(deviceGraphScript); bouncex.initializeTag = function() {}; }; runtime.onload = bouncex.initializeTag; document.body.appendChild(runtime); } } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", bxBootstrap); } else { bxBootstrap(); }})();