var DfpSlotManagerMixin = DfpSlotManagerMixin || (function() { var DfpSlotManager = function() { this.dfpSlots = {}; this.initialize = function() { $(document).on('dfpSlotManager::updateSlot', function(e, data) { this.updateSlot(data); }.bind(this)); $(document).on('adsRefresher::beforeDfpRefresh', function() { this.beforeSlotRefresh(); }.bind(this)); }; this.getSlots = function() { return this.dfpSlots; }.bind(this); this.updateSlot = function(payload) { payload = typeof payload === 'object' ? payload : {}; if (!this.dfpSlots[payload.id]) { this.dfpSlots[payload.id] = payload; } else if (!$('#' + payload.id).hasClass('permanent_hide')) { $.extend(this.dfpSlots[payload.id], payload); } }.bind(this); this.handleSlotStacking = function(slot) { var direction = slot.refreshWhenNodeHasContent; var refreshable = true; if (!direction || direction === 'None') { return refreshable; } var slotNode = $('#' + slot.id)[0]; var $slotParent = $(slotNode.parentElement); var nodesToCheck = []; var $firstNodeToCheck = {}; var $secondNodeToCheck = {}; if (direction === 'Next') { $firstNodeToCheck = $slotParent.next(); $secondNodeToCheck = $firstNodeToCheck.next(); } else { $firstNodeToCheck = $slotParent.prev(); $secondNodeToCheck = $firstNodeToCheck.prev(); } nodesToCheck.push($firstNodeToCheck); nodesToCheck.push($secondNodeToCheck); var allChildrenEmpty = true; var nodesOk = false; nodesToCheck.forEach(function($nodeToCheck) { $nodeToCheck.children().each(function() { if ($(this).children().length || !!$.trim($(this).html())) { allChildrenEmpty = false; } return allChildrenEmpty; }); var isDfpSlot = $nodeToCheck.hasClass('ads_dfpslot') || $nodeToCheck.hasClass('v2_ads_dfpslot'); var nodeHasChildren = !!$nodeToCheck.children().length; var nodeHasText = $.trim($nodeToCheck.text()) !== ''; var nodeHasMarkup = $.trim($nodeToCheck.html()) !== ''; if (!isDfpSlot && ((!allChildrenEmpty && nodeHasText) || nodeHasChildren || nodeHasMarkup)) { nodesOk = true; } return nodesOk; }); if (!nodesOk) { slot.refresh = false; $('#' + slot.id).hide(); $('#' + slot.id).addClass('permanent_hide'); // Don't apply ad stacking logic if slot explicitly set { hidden: true }, // if hidden === true, slot is unaffiliated with ad stacking } else if (!slot.hidden) { slot.refresh = true; $('#' + slot.id).show(); } refreshable = slot.refresh; return refreshable; }; this.beforeSlotRefresh = function() { for (var key in this.dfpSlots) { this.handleSlotStacking(this.dfpSlots[key]); } }.bind(this); }; var dfpSlotManager = new DfpSlotManager(); dfpSlotManager.initialize(); var exposedManagerMethods = { getSlots: dfpSlotManager.getSlots, updateSlot: dfpSlotManager.updateSlot, beforeSlotRefresh: dfpSlotManager.beforeSlotRefresh }; return exposedManagerMethods; })(); var PageDepthManager = PageDepthManager || (function() { var pageDepth = 0; var prevHref; var attributes = { pageDepthVariableName: 'guteref' }; function initialize(options) { $.extend(attributes, options); function sameDomain() { return document.domain === sessionStorage.prevDomain; }; function uniqueReferal() { var uniq = document.referrer !== sessionStorage.prevReferrer; return !!document.referrer && uniq; }; if (sameDomain() && uniqueReferal()) { pageDepth = Number(sessionStorage.pageDepth); } sessionStorage.prevDomain = document.domain || ''; sessionStorage.prevReferrer = document.referrer || ''; initialize = function() { return this; } return this; } function emitDepth() { try { googletag.cmd.push(function() { googletag.pubads().setTargeting(attributes.pageDepthVariableName, String(pageDepth)); }); } catch(e) { // window.googletag || googletag.cmd undefined } return this; }; function incrementDepth() { var pageChange = prevHref !== location.href; if (pageChange) { pageDepth += 1; sessionStorage.pageDepth = pageDepth; } prevHref = location.href; return this; }; function getDepth() { return pageDepth; }; return { initialize: initialize, emitDepth: emitDepth, incrementDepth: incrementDepth, getDepth: getDepth }; })(); var AppContentData = AppContentData || (function() { var moduleName = 'js_app_contentdata-0'; var ContentDataController = function() { var pageData = __page_data__ || {}; var data = pageData[moduleName]; var actionHandlers = function() { return { 'contentData::getCategories': this.getCategories, 'contentData::getTitle': this.getTitle }; }.bind(this); var bindActionHandlers = function() { actionHandlers = actionHandlers(); var keys = Object.keys(actionHandlers); for (var i = 0; i < keys.length; i++) { var action = keys[i]; var handler = actionHandlers[keys[i]]; $(document).on(action, handler); } }; this.initialize = function() { bindActionHandlers(); }; this.getCategories = function(event, payload) { payload = payload || {}; if (!data.categories) { return undefined; } var categories = { category: data.categories.category, subcategory: data.categories.subcategory }; if (!!payload.done) { payload.done.call(payload.done, categories); } return categories; }.bind(this); this.getTitle = function(event, payload) { payload = payload || {}; if (!data.title) { return undefined; } if (!!payload.done) { payload.done.call(payload.done, data.title); } return data.title; }.bind(this); }; var controller = new ContentDataController() controller.initialize() return { getCategories: function(payload) { return controller.getCategories(null, payload); }, getTitle: function(payload) { return controller.getTitle(null, payload); } }; })(); /* global initAdserver googletagData */ var pbjs = pbjs || {}; pbjs.que = pbjs.que || []; var PrebidManager = PrebidManager || (function() { var adUnits = []; var slotNum = 0; var indexID = 0; // Used for indexExchange until they fix their bidder function initialize(timeout) { pbjs.isEnabled = true; pbjs.timeout = timeout; // Next block is used to load the Prebid.js CDN whenever we don't use a prebuilt one. // Keep for now until we work out kinks // (function() { // var pbjsEl = document.createElement('script'); // pbjsEl.type = 'text/javascript'; // pbjsEl.async = true; // pbjsEl.src = '//acdn.adnxs.com/prebid/static/0.6.0/prebid.js'; // var pbjsTargetEl = document.getElementsByTagName('head')[0]; // pbjsTargetEl.insertBefore(pbjsEl, pbjsTargetEl.firstChild); // })(); // add sovrn beacon if (googletagData.sovrn_bidder) { (function() { var sovrnBeacon = document.createElement('script'); sovrnBeacon.type = 'text/javascript'; sovrnBeacon.id = 'sBeacon'; sovrnBeacon.src = '//ap.lijit.com/www/sovrn_beacon_standalone/sovrn_standalone_beacon.js?iid=12106015&uid=answers'; var sovrnBeaconTargetEl = document.getElementsByTagName('head')[0]; sovrnBeaconTargetEl.insertBefore(sovrnBeacon, sovrnBeaconTargetEl.firstChild); })(); } pbjs.que.push(function() { // 1-cent increments up to $20 pbjs.setPriceGranularity('high'); }); return this; } function registerSlot(slot, sizes) { var slotConfig = { code: slot.container_id, sizes: sizes, bids: buildBidderParams(slot) }; adUnits.push(slotConfig); return this; } function buildBidderParams(slot) { var params = []; var explodedTag = slot.ad_unit.split('/'); var adUnit = explodedTag[explodedTag.length - 1]; var sizeRegEx = /[0-9]{2,3}x[0-9]{2,3}_.*/; var placement = (sizeRegEx.test(adUnit)) ? sizeRegEx.exec(adUnit)[0] : '300x250_' + ++slotNum; if (googletagData.sovrn_bidder && slot.enable_sovrn_bidding !== 'off') { var sovrnParams = generateSovrnParams(placement, adUnit); if (sovrnParams) { params.push(sovrnParams); } } if (googletagData.new_aol_bidder && slot.enable_aol_bidding !== 'off') { var AOLParams = generateAOLParams(placement, adUnit); if (AOLParams) { params.push(AOLParams); } } if (googletagData.new_indexexchange_bidder && slot.enable_indexexchange_bidding !== 'off') { var indexParams = generateIndexParams(placement); if (indexParams) { params.push(indexParams); } } if (googletagData.appnexus_bidder && slot.enable_appnexus_bidding !== 'off') { var appNexusParams = generateAppNexusParams(placement); if (appNexusParams) { params.push(appNexusParams); } } if (googletagData.districtm_bidder && slot.enable_districtm_bidding !== 'off') { var districtMParams = generateDistrictMParams(placement, adUnit); if (districtMParams) { params.push(districtMParams); } } return params; } function generateSovrnParams(placement, adUnit) { // Ugly mapping ahead var map = { ANSWG_160x600_1: 405179, ANSWG_160x600_2: 405180, ANSWG_728x90_1: 405181, ANSWG_728x90_2: 405182, ANSWG_728x90_3: 405183, ANSWG_728x90_4: 405184, ANSWG_728x90_5: 405185, ANSWG_300x250_1: 405186, ANSWG_300x250_2: 405187, ANSWG_300x250_3: 405188, ANSWG_300x250_1_mobile: 405189, ANSWG_300x250_2_mobile: 405190, ANSWG_300x250_3_mobile: 405191, ANSWG_300x250_4_mobile: 405192, ANSWG_300x250_5_mobile: 405193, ANSW_160x600_1: 405413, ANSW_160x600_2: 405414, ANSW_728x90_1: 405415, ANSW_728x90_2: 405417, ANSW_728x90_3: 405418, ANSW_728x90_4: 405419, ANSW_728x90_5: 405420, ANSW_300x250_1: 405421, ANSW_300x250_2: 405422, ANSW_300x250_3: 405423, ANSW_300x250_1_mobile: 405426, ANSW_300x250_2_mobile: 405428, ANSW_300x250_3_mobile: 405430, ANSW_300x250_4_mobile: 405431, ANSW_300x250_5_mobile: 405432, ROA_160x600_1: 405194, ROA_160x600_2: 405195, ROA_728x90_1: 405196, ROA_728x90_2: 405197, ROA_728x90_3: 405198, ROA_728x90_4: 405199, ROA_728x90_5: 405200, ROA_300x250_1: 405201, ROA_300x250_2: 405202, ROA_300x250_3: 405203, ROA_300x250_1_mobile: 405204, ROA_300x250_2_mobile: 405205, ROA_300x250_3_mobile: 405206, ROA_300x250_4_mobile: 405207, ROA_300x250_5_mobile: 405208, LAU_160x600_1: 405210, LAU_160x600_2: 405211, LAU_728x90_1: 405212, LAU_728x90_2: 405213, LAU_728x90_3: 405214, LAU_728x90_4: 405215, LAU_728x90_5: 405216, LAU_300x250_1: 405217, LAU_300x250_2: 405218, LAU_300x250_3: 405219, LAU_300x250_1_mobile: 405220, LAU_300x250_2_mobile: 405221, LAU_300x250_3_mobile: 405222, LAU_300x250_4_mobile: 405223, LAU_300x250_5_mobile: 405224, EK_160x600_1: 405225, EK_160x600_2: 405226, EK_728x90_1: 405227, EK_728x90_2: 405228, EK_728x90_3: 405229, EK_728x90_4: 405230, EK_728x90_5: 405231, EK_300x250_1: 405232, EK_300x250_2: 405233, EK_300x250_3: 405234, EK_300x250_1_mobile: 405235, EK_300x250_2_mobile: 405236, EK_300x250_3_mobile: 405237, EK_300x250_4_mobile: 405238, EK_300x250_5_mobile: 405239, FSB_160x600_1: 405351, FSB_160x600_2: 405352, FSB_728x90_1: 405353, FSB_728x90_2: 405354, FSB_728x90_3: 405355, FSB_728x90_4: 405356, FSB_728x90_5: 405357, FSB_300x250_1: 405358, FSB_300x250_2: 405359, FSB_300x250_3: 405360, FSB_300x250_1_mobile: 405378, FSB_300x250_2_mobile: 405379, FSB_300x250_3_mobile: 405380, FSB_300x250_4_mobile: 405381, FSB_300x250_5_mobile: 405383 }; var placement = googletagData.site_code + '_' + placement; if (adUnit.indexOf('gut_') === 0) { placement += '_mobile'; } var tagid = map[placement]; if (tagid) { return { bidder: 'sovrn', params: { tagid: tagid } }; } else { return; } } function generateAOLParams(placement, adUnit) { // Note: in Prebid.js documentation 'placement' is needed for AOL // 'placement' and 'alias' map 1:1, so only one or the other is needed per a conversation with AOL var alias = googletagData.site_code + '_' + placement + '_header'; if (adUnit.indexOf('gut_') === 0) { alias += '_mobile'; } return { bidder: 'aol', params: { network: '9424.1', alias: alias } }; } function generateIndexParams(placement) { var map = { ANSWG_160x600_1_header: 172832, ANSWG_300x250_1_header: 172833, ANSWG_300x250_2_header: 172834, ANSWG_300x250_3_header: 172835, ANSWG_300x250_4_header: 172837, ANSWG_728x90_1_header: 175090, ANSWG_728x90_2_header: 172828, ANSWG_728x90_3_header: 172829, ANSWG_728x90_4_header: 172830, ANSWG_728x90_5_header: 172831, BLE_728x90_1_header: 174945, BLE_728x90_2_header: 174946, BLE_728x90_3_header: 174947, BLE_728x90_4_header: 174948, BLE_728x90_5_header: 174949, BLE_300x250_1_header: 174950, BLE_300x250_2_header: 174951, BLE_300x250_3_header: 174952, BLE_300x250_4_header: 174953, BLE_160x600_1_header: 174954, ELS_728x90_1_header: 175039, ELS_728x90_2_header: 175040, ELS_728x90_3_header: 175041, ELS_728x90_4_header: 175042, ELS_728x90_5_header: 175043, ELS_300x250_1_header: 175044, ELS_300x250_2_header: 175045, ELS_300x250_3_header: 175046, ELS_300x250_4_header: 175047, ELS_160x600_1_header: 175048, NEW_728x90_1_header: 175049, NEW_728x90_2_header: 175050, NEW_728x90_3_header: 175051, NEW_728x90_4_header: 175052, NEW_728x90_5_header: 175053, NEW_300x250_1_header: 175054, NEW_300x250_2_header: 175055, NEW_300x250_3_header: 175056, NEW_300x250_4_header: 175057, NEW_160x600_1_header: 175058, PRE_728x90_1_header: 175059, PRE_728x90_2_header: 175060, PRE_728x90_3_header: 175061, PRE_728x90_4_header: 175062, PRE_728x90_5_header: 175063, PRE_300x250_1_header: 175064, PRE_300x250_2_header: 175065, PRE_300x250_3_header: 175066, PRE_300x250_4_header: 175067, PRE_160x600_1_header: 175068, ROA_728x90_1_header: 175069, ROA_728x90_2_header: 175070, ROA_728x90_3_header: 175071, ROA_728x90_4_header: 175072, ROA_728x90_5_header: 175073, ROA_300x250_1_header: 175074, ROA_300x250_2_header: 175075, ROA_300x250_3_header: 175076, ROA_300x250_4_header: 175077, ROA_160x600_1_header: 175078, SPL_728x90_1_header: 175079, SPL_728x90_2_header: 175081, SPL_728x90_3_header: 175082, SPL_728x90_4_header: 175083, SPL_728x90_5_header: 175084, SPL_300x250_1_header: 175085, SPL_300x250_2_header: 175086, SPL_300x250_3_header: 175087, SPL_300x250_4_header: 175088, SPL_160x600_1_header: 175089 }; return { bidder: 'indexExchange', params: { id: ++indexID, siteID: map[googletagData.site_code + '_' + placement + '_header'] } }; } function generateAppNexusParams(placement) { return { bidder: 'appnexus', params: { invCode: googletagData.site_code + '_' + placement + '_header', member: 3768 } }; } function generateDistrictMParams(placement, adUnit) { var map = { ANSWG: { desktop: 9810275, mobile: 9810274 }, LAU: { desktop: 9810276, mobile: 9810277 }, EK: { desktop: 9831674, mobile: 9831675 }, BLE: { desktop: 9831671, mobile: 9831672 }, HEA: { desktop: 9831676, mobile: 9831677 }, RID: { desktop: 9831678, mobile: 9831679 }, RUM: { desktop: 9831680, mobile: 9831681 }, SUP: { desktop: 9831682, mobile: 9831683 }, ANSW: { desktop: 9882447, mobile: 9882448 } }; if (map[googletagData.site_code]) { return { bidder: 'districtm', params: { placementId: map[googletagData.site_code][(adUnit.indexOf('gut_') === 0) ? 'mobile' : 'desktop'] } }; } else { return; } } function populateAdUnits() { pbjs.que.push(function() { if (googletagData.districtm_bidder) { pbjs.aliasBidder('appnexus', 'districtm'); } pbjs.addAdUnits(adUnits); pbjs.bidderSettings = { aol: { bidCpmAdjustment: function(bidCpm) { // 90% rev share with AOL return bidCpm * 0.90; } } }; }); return this; } function requestBids() { pbjs.que.push(function() { pbjs.requestBids({ timeout: pbjs.timeout, bidsBackHandler: function() { window.initAdServer(); } }); }); return this; } function sendBids() { pbjs.que.push(function() { pbjs.setTargetingForGPTAsync(); }); } function refresh(name) { pbjs.que.push(function() { pbjs.requestBids({ timeout: pbjs.timeout, bidsBackHandler: function() { pbjs.setTargetingForGPTAsync(); $(document).trigger('received_partner_bid-' + name); } }); }); } return { initialize: initialize, registerSlot: registerSlot, lockInAdUnits: populateAdUnits, requestBids: requestBids, setTargeting: sendBids, refresh: refresh }; })(); /* global __page_data__ PrebidManager DfpSlotManagerMixin pbjs PageDepthManager AppContentData amznads d*/ var googletagData = __page_data__['ads_dfpheader2-0'] || {}; var load_group = []; var interstitial_group = []; var custom_1_group = []; var custom_2_group = []; var custom_3_group = []; var PREBID_TIMEOUT = googletagData.header_bidding_timeout; if (!googletagData.openx_bidder) { var googletag = googletag || {}; googletag.cmd = googletag.cmd || []; } if (googletagData.rubicon_bidder) { var rubicontag = rubicontag || {}; rubicontag.cmd = rubicontag.cmd || []; } if (googletagData.indexexchange_bidder) { window.headertag_ready = window.headertag_ready || false; } if (googletagData.new_aol_bidder || googletagData.new_indexexchange_bidder || googletagData.sovrn_bidder || googletagData.appnexus_bidder || googletagData.districtm_bidder) { PrebidManager.initialize(PREBID_TIMEOUT); } var gptLoaded = false; function initAdServer() { if (!gptLoaded) { (function() { var gads = document.createElement('script'); gads.async = true; gads.type = 'text/javascript'; var useSSL = document.location.protocol === 'https:'; gads.src = (useSSL ? 'https:' : 'http:') + '//www.googletagservices.com/tag/js/gpt.js'; var node = document.getElementsByTagName('script')[0]; node.parentNode.insertBefore(gads, node); })(); gptLoaded = true; } } var numExpectedRequests = googletagData.rubicon_bidder + googletagData.indexexchange_bidder; var numReceivedRequests = 0; $(document).on('receivedPrepingBid', function() { numReceivedRequests++; if (numReceivedRequests === numExpectedRequests) { initAdServer(); } }); if (window.headertag_ready) { numReceivedRequests++; } // backup timer to allow for prebidding if (googletagData.rubicon_bidder || (googletagData.indexexchange_bidder && !window.headertag_ready) || pbjs.isEnabled) { setTimeout(initAdServer, PREBID_TIMEOUT); } else { initAdServer(); } var filterObject = function(obj, predicate) { var key; var result = []; for (key in obj) { if (obj.hasOwnProperty(key) && predicate(obj[key])) { result.push(obj[key]); } } return result; }; var dfpheader2 = dfpheader2 || (function() { var isArrayLike = function(variable) { var isObject = typeof variable === 'object'; var hasLength = typeof variable.length === 'number'; return isObject && hasLength; }; var Model = function(model) { // strip unnecessary 'dfp_' prefix from ads/dfpslot configs function normalizeSlotKeys() { var i = 0; while (model.dfpSlots[i]) { var slot = model.dfpSlots[i]; var keys = Object.keys(slot); for (var index = 0; index < keys.length; index++) { var key = keys[index]; if (key.match('dfp_')) { var normalKey = key.replace('dfp_', ''); if (normalKey === 'div_id') { normalKey = 'container_id'; } slot[normalKey] = slot[key]; delete slot[key]; } } model.dfpSlots[i] = slot; i++; } } this.each = function(key, callback) { var value = model[key]; var i; var len; if (typeof value === 'object' && !!value.push) { for (i = 0, len = value.length; i < len; i++) { callback.call(model, value[i]); } } else if (typeof value === 'object') { var keys = Object.keys(value); for (i = 0, len = keys.length; i < len; i++) { callback.call(model, value[keys[i]]); } } }; this.get = function(key) { return typeof model[key] === 'undefined' ? {} : model[key]; }; (function initialize() { if (model.dfpSlots) { normalizeSlotKeys(); } })(); }; // if ads/dfpheader2 config 'load_on_carousel_ready' set to 'on' // && have dfpslot objects && carousel has images // then load make initial call for dfpslots var handleCarouselCoupledSlotInitialization = function() { var initializeSlots = function() { DfpSlotManagerMixin.beforeSlotRefresh(); var slotsToInit = filterObject(DfpSlotManagerMixin.getSlots(), function(slot) { return slot.refresh === true; }); slotsToInit = $.map(slotsToInit, function(slot) { return slot.object; }); // Func '..refresh()' is a misnomer in this case // because disableInitialLoad called, slots have yet to initialize googletag.pubads().refresh(slotsToInit); }; var checkReady = function() { var slots = DfpSlotManagerMixin.getSlots(); var hasSlots = Object.keys(slots).length > 0; if (hasSlots) { var imageWrapper = document.getElementsByClassName('carousel_ui_img-0')[0]; var sectionWrapper = document.getElementsByClassName('subject_section')[0]; var image; var embed; if (!!imageWrapper) { image = imageWrapper.getElementsByTagName('img')[0]; embed = imageWrapper.getElementsByClassName('embed')[0]; if (!!image || !!embed) { window.clearInterval(check); initializeSlots(); } } else if (!!sectionWrapper) { var section = sectionWrapper.getElementsByClassName('section')[0]; if (!!section) { window.clearInterval(check); setTimeout(function() { initializeSlots(); }, 50); } } else { return; } } }; var check = window.setInterval(checkReady, 50); }; var sandboxDfpslots = function() { var whitelist = filterObject(DfpSlotManagerMixin.getSlots(), function(slot) { return slot.sandboxWhitelist; }); Node.prototype.appendChild_ = Node.prototype.appendChild; Node.prototype.appendChild = function(el) { if (el.nodeName === 'IFRAME') { var shouldFilter = true; // never sandbox FB ad iframes if ( this.nodeName === 'FB:AD' || (this.closest && this.closest('fb\\:ad')) || (this.closest && this.closest('.fb-ad')) || (this.closest && this.closest('.fb_iframe_widget')) || (this.closest && this.closest('.fb-page')) || (this.closest && this.closest('.fb-banner')) || (window.jQuery && jQuery(this).closest('fb\\:ad').length) || (window.jQuery && jQuery(this).closest('.fb-page').length) || (window.jQuery && jQuery(this).closest('.fb-ad').length) || (window.jQuery && jQuery(this).closest('.fb_iframe_widget').length) || (window.jQuery && jQuery(this).closest('.fb-banner').length) || (el.src && el.src.search('facebook.com') !== -1 && el.src.search('plugins/ad.php') !== -1) ) { shouldFilter = false; } if (shouldFilter && whitelist.length > 0) { for (var i = 0, len = whitelist.length; i < len; i++) { if (whitelist[i].ad_unit && el.id.search(whitelist[i].ad_unit) !== -1) { shouldFilter = false; } } } if (shouldFilter) { el.sandbox = 'allow-forms allow-popups allow-scripts allow-same-origin'; } } Node.prototype.appendChild_.apply(this, arguments); return el; }; var documentWriteFilter = function(html) { try { var shouldFilter = false; // never sandbox FB ad iframes if (html && !(html.search('facebook.com') !== -1 && html.search('plugins/ad.php') !== -1)) { shouldFilter = true; if (whitelist.length > 0) { for (var i = 0, len = whitelist.length; i < len; i++) { // could generate false positives, if becomes an issue make more specific if (whitelist[i].ad_unit && html.search(whitelist[i].ad_unit) !== -1) { shouldFilter = false; } } } } if (shouldFilter) { html = html.replace(/