-
-
Save thomasbaldwin/93cf155a8ebd3a2316e37b09dfee9e9d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function() { | |
| function bxBootstrap() { | |
| if (!(window.bouncex && bouncex.website)) { | |
| var pushedData = []; | |
| if (window.bouncex && bouncex.push && bouncex.length) { | |
| pushedData = bouncex; | |
| } | |
| window.bouncex = {}; | |
| bouncex.pushedData = pushedData; | |
| bouncex.website = { | |
| "id": 1021, | |
| "cookie_name": "bounceClientVisit1021", | |
| "domain": "cnbc.com", | |
| "ct": "bind_to_domain", | |
| "ally": 0, | |
| "ei": 1, | |
| "tcjs": "", | |
| "cjs": "//CAP - commenting out Omniture tracking per client request 6.6.16\n\n//window.bouncex.set_omni = function (acct) {\n// window.scodePath = '//fm.cnbc.com/applications/cnbc.com/staticcontent/scripts/omniture/s_code.js';\n// if (!window.mps) { window.mps = {}; }\n// window.mps.s_account = acct;\n// window.s_account = acct;\n// jQuery('<script/>', {type: 'text/javascript', src: scodePath}).appendTo('body');\n//}\n\n//window.bouncex.omni_track = function (pageName) {\n// window.s.pageName = pageName;\n \n// window.s.channel = \"free: cnbc.com\";\n// window.s.prop1=\"franchise\"; \n// window.s.prop10=\"BounceX\";\n// window.s.prop16 = \"section\";\n// window.s.prop31=\"BounceX\";\n// window.s.prop37=\"wildcard\";\n// window.s.prop6= document.hostname;\n// window.s.prop8 =\"cnbc\";\n// window.s.prop9 =\"cnbc.com\";\n// if (window.s.prop23 !== '') {\n// window.s.prop23 = '';\n// }\n// if (window.s.prop28 !== '') {\n// window.s.prop28 = '';\n// }\n \n //var s_code=s.t();\n //if(s_code)document.write(s_code);\n // if(navigator.appVersion.indexOf('MSIE')>=0)document.write(unescape('%3C')+'\\!-'+'-');\n//};\n\n\n\n//MW newsletter signup CV - using subscription ID as repeats some names for newsletters\njQuery(document).on('ajaxComplete.bx', function(e, xhr, settings) {\n if (xhr.status === 200 && xhr.responseJSON && xhr.responseJSON.message === 'Data Synced Successfully' && typeof settings.data === 'string') {\n var data = settings.data;\n var subscriptions = data.substring(data.indexOf('&subscriptions='), data.indexOf('&source='));\n var newsletters = subscriptions.replace(/[^0-9|]/g,'').split('|');\n \n if (newsletters.length > 0) {\n newsletters.forEach(function(el) {\n switch(el){\n case '40000031': //make it\n bouncex.setv('makeit_submit', true); break;\n case '40000030': //your money your vote\n bouncex.setv('ymyv_submit', true); break;\n case '40000007': //breaking news\n bouncex.setv('breakingnews_submit', true); break;\n case '40000001': //morning squawk\n bouncex.setv('msquawk_submit', true); break;\n case '40000002': //evening brief\n bouncex.setv('eveningbrief_submit', true); break;\n case '40000003': //watch live\n bouncex.setv('watchlive_submit', true); break;\n case '40000004': //your wealth\n bouncex.setv('yourwealth_submit', true); break;\n case '40000037': //futures now\n bouncex.setv('futuresnow_submit', true); break;\n case '40000017': //big data investor\n bouncex.setv('bigdata_submit', true); break;\n case '40000005': //options action\n bouncex.setv('opt_action_submit', true); break;\n case '40000036': //cnbc prime newsletter\n bouncex.setv('prime_submit', true); break;\n }\n });\n bouncex.setBounceCookie();\n \t bouncex.reload_campaigns();\n }\n }\n});", | |
| "force_https": false, | |
| "waypoints": true, | |
| "content_width": 950, | |
| "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": "/invest-in-you/" | |
| }, { | |
| "prop": "contains", | |
| "val": "/qa10pub.cnbc.com/" | |
| }, { | |
| "prop": "contains", | |
| "val": "/qa11pub.cnbc.com" | |
| }], | |
| "ple": false, | |
| "fbe": false, | |
| "mas": 1, | |
| "map": 1, | |
| "gar": true, | |
| "ete": 0, | |
| "ettm": true, | |
| "etjs": "", | |
| "dge": false, | |
| "bxidLoadFirst": false, | |
| "gbi_enabled": 1, | |
| "gbi": { | |
| "rblocks": null | |
| }, | |
| "bpush": false, | |
| "pt": null, | |
| "els": { | |
| "landing_page": "div#cnbc-body, div#cnbc-contents.cnbc-contents", | |
| "masthead": ".PageBuilder-pageRow.PageBuilder-containerWidth100:eq(1)" | |
| }, | |
| "vars": [{ | |
| "name": "logged_in", | |
| "polling": "all", | |
| "persist": "no", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "jQuery('#signout').is(':visible');", | |
| "trigger": "" | |
| }, { | |
| "name": "sprop31", | |
| "polling": "none", | |
| "persist": "no", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": 0, | |
| "code": "bouncex.utils.getNestedProp('s.prop31') || 'none';", | |
| "trigger": "" | |
| }, { | |
| "name": "your_wealth", | |
| "polling": "none", | |
| "persist": "no", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "s.prop31 == 'Wealth' || s.prop31 == 'Personal Finance' || s.prop31 == 'Life';", | |
| "trigger": "" | |
| }, { | |
| "name": "technology", | |
| "polling": "none", | |
| "persist": "no", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "null;", | |
| "trigger": "" | |
| }, { | |
| "name": "premium_article", | |
| "polling": "none", | |
| "persist": "no", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "s.prop5 == 'Premium';", | |
| "trigger": "" | |
| }, { | |
| "name": "pro_squawkbox", | |
| "polling": "none", | |
| "persist": "no", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "jQuery('#page_header:contains(Squawk Box)').length > 0;", | |
| "trigger": "" | |
| }, { | |
| "name": "pro_fastmoney", | |
| "polling": "none", | |
| "persist": "no", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "s.prop36 == '102138330';", | |
| "trigger": "" | |
| }, { | |
| "name": "is_pro", | |
| "polling": "all", | |
| "persist": "no", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "/ispro=true/.test(document.cookie);", | |
| "trigger": "" | |
| }, { | |
| "name": "se", | |
| "polling": "none", | |
| "persist": "permanent", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "bouncex.vars.se || false", | |
| "trigger": "" | |
| }, { | |
| "name": "markets", | |
| "polling": "none", | |
| "persist": "no", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "s.prop31.toLowerCase() === 'markets';", | |
| "trigger": "" | |
| }, { | |
| "name": "premium_article_pageviews", | |
| "polling": "none", | |
| "persist": "visit", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "0", | |
| "code": "null;", | |
| "trigger": "" | |
| }, { | |
| "name": "markets_this_session", | |
| "polling": "none", | |
| "persist": "visit", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "null;", | |
| "trigger": "" | |
| }, { | |
| "name": "investing_referrer", | |
| "polling": "none", | |
| "persist": "no", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "null;", | |
| "trigger": "" | |
| }, { | |
| "name": "investing_this_session", | |
| "polling": "none", | |
| "persist": "visit", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "null;", | |
| "trigger": "" | |
| }, { | |
| "name": "article_title", | |
| "polling": "all", | |
| "persist": "no", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "", | |
| "code": "jQuery('.ArticleHeader-headline').text() || false;", | |
| "trigger": "" | |
| }, { | |
| "name": "makeit_submit", | |
| "polling": "none", | |
| "persist": "permanent", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "bouncex.ibx._getparam('__source').split('|')[1] === 'makeitweekly' ? true : null;", | |
| "trigger": "" | |
| }, { | |
| "name": "breakingnews_submit", | |
| "polling": "none", | |
| "persist": "permanent", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "bouncex.ibx._getparam('__source').split('|')[1] === 'breakingnews' ? true : null;", | |
| "trigger": "" | |
| }, { | |
| "name": "ymyv_submit", | |
| "polling": "none", | |
| "persist": "permanent", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "bouncex.ibx._getparam('__source').split('|')[1] === 'yourmoneyyourvote' ? true : null;", | |
| "trigger": "" | |
| }, { | |
| "name": "watchlive_submit", | |
| "polling": "none", | |
| "persist": "permanent", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "bouncex.ibx._getparam('__source').split('|')[1] === 'watchlivealert' ? true : null;", | |
| "trigger": "" | |
| }, { | |
| "name": "yourwealth_submit", | |
| "polling": "none", | |
| "persist": "permanent", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "bouncex.ibx._getparam('__source').split('|')[1] === 'yourwealth' ? true : null;", | |
| "trigger": "" | |
| }, { | |
| "name": "bigdata_submit", | |
| "polling": "none", | |
| "persist": "permanent", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "bouncex.ibx._getparam('__source').split('|')[1] === 'bigdatainvestor' ? true : null;", | |
| "trigger": "" | |
| }, { | |
| "name": "opt_action_submit", | |
| "polling": "none", | |
| "persist": "permanent", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "null;", | |
| "trigger": "" | |
| }, { | |
| "name": "onsite_popup", | |
| "polling": "all", | |
| "persist": "no", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "/*sign up/login modal */\njQuery('.SurfComponent-surfPopupBackground .SurfComponent-SignInSignUp:visible').length > 0;", | |
| "trigger": "" | |
| }, { | |
| "name": "sprop10", | |
| "polling": "none", | |
| "persist": "no", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "(function() {\n\tvar ALPHA_NUM_REGEX = /[^a-z0-9 ]+/gi;\n\tvar SPACE_FORMAT_REGEX = /\\s\\s+/g;\n\tvar tagName = bouncex.utils.getNestedProp('s.prop10');\n\n\treturn tagName ? tagName.replace(ALPHA_NUM_REGEX, '').replace(SPACE_FORMAT_REGEX, ' ').trim() : false;\n})();", | |
| "trigger": "" | |
| }, { | |
| "name": "breaking_news", | |
| "polling": "all", | |
| "persist": "no", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "jQuery('.BreakingNews-container').length > 0;", | |
| "trigger": "" | |
| }, { | |
| "name": "eveningbrief_submit", | |
| "polling": "none", | |
| "persist": "permanent", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "null;", | |
| "trigger": "" | |
| }, { | |
| "name": "msquawk_submit", | |
| "polling": "none", | |
| "persist": "permanent", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "null;", | |
| "trigger": "" | |
| }, { | |
| "name": "facebook_source", | |
| "polling": "none", | |
| "persist": "permanent", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "0", | |
| "code": "null", | |
| "trigger": "" | |
| }, { | |
| "name": "article_content", | |
| "polling": "all", | |
| "persist": "no", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "jQuery('#main-article-header').length > 0 && document.querySelector('meta[name=keywords]') && document.querySelector('meta[name=keywords]').content;", | |
| "trigger": "" | |
| }, { | |
| "name": "page_type_is_slideshow", | |
| "polling": "none", | |
| "persist": "no", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "mpscall.template == \"slideshow_one_page\"", | |
| "trigger": "" | |
| }, { | |
| "name": "futuresnow_submit", | |
| "polling": "none", | |
| "persist": "permanent", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "null;", | |
| "trigger": "" | |
| }, { | |
| "name": "prime_submit", | |
| "polling": "none", | |
| "persist": "permanent", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "null;", | |
| "trigger": "" | |
| }, { | |
| "name": "kensho", | |
| "polling": "none", | |
| "persist": "no", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "(function() {\n var metaKeywords = jQuery('[name=keywords]').attr('content');\n if (metaKeywords && metaKeywords.toLowerCase().indexOf('kensho') > -1) {\n return true;\n } else if (window.mpscall && window.mpscall.cat && window.mpscall.cat.indexOf('Kensho') > -1) {\n return true;\n }\n return false;\n})()", | |
| "trigger": "" | |
| }, { | |
| "name": "article_tags", | |
| "polling": "all", | |
| "persist": "no", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "(function(){\n // Do not set to persistent so it's not stored in cookie\n if (jQuery('meta[property=\"og:type\"]').attr('content') === 'article') {\n var keywords = jQuery('meta[name=keywords]').attr('content');\n var newsKeywords = jQuery('meta[name=news_keywords]').attr('content');\n if (keywords && newsKeywords) {\n return keywords.toLowerCase() + ', ' + newsKeywords.toLowerCase();\n } else if (keywords) {\n return keywords.toLowerCase();\n } else if (newsKeywords) {\n return newsKeywords.toLowerCase();\n }\n }\n})();", | |
| "trigger": "" | |
| }, { | |
| "name": "article_reporter", | |
| "polling": "all", | |
| "persist": "no", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "(function(){\n\tvar isArticlePage = jQuery('meta[property=\"og:type\"]').attr('content') === 'article';\n\t\n \tif (isArticlePage && window.__CNBC_META_DATA) {\n\t\treturn __CNBC_META_DATA.creatorOverwriteFormatted !== 'NA' ? __CNBC_META_DATA.creatorOverwriteFormatted : __CNBC_META_DATA.authorFormatted;\n\t}\n\treturn false;\n})();", | |
| "trigger": "" | |
| }, { | |
| "name": "sponsored_pages", | |
| "polling": "none", | |
| "persist": "no", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "s.prop37 === 'sponsored' || s.prop37 === 'wildcard';", | |
| "trigger": "" | |
| }, { | |
| "name": "closingthegap_submit", | |
| "polling": "none", | |
| "persist": "no", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "null;", | |
| "trigger": "pageload" | |
| }, { | |
| "name": "gdpr_bar_present", | |
| "polling": "all", | |
| "persist": "no", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "jQuery('#_evh-ric:visible').length > 0;", | |
| "trigger": "pageload" | |
| }, { | |
| "name": "warrenbuffet_submit", | |
| "polling": "none", | |
| "persist": "permanent", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "null;", | |
| "trigger": "pageload" | |
| }, { | |
| "name": "etfedge_submit", | |
| "polling": "none", | |
| "persist": "permanent", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "null;", | |
| "trigger": "pageload" | |
| }, { | |
| "name": "exchange_submit", | |
| "polling": "none", | |
| "persist": "permanent", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "null;", | |
| "trigger": "pageload" | |
| }, { | |
| "name": "capex_submit", | |
| "polling": "none", | |
| "persist": "permanent", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "null;", | |
| "trigger": "pageload" | |
| }, { | |
| "name": "campaign_session_limit", | |
| "polling": "all", | |
| "persist": "visit", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "bouncex.cookie.ao > 6 ? true : null;", | |
| "trigger": "pageload" | |
| }, { | |
| "name": "sessionnumber", | |
| "polling": "none", | |
| "persist": "no", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "(function(){\n var sn = Number(bouncex.utils.getNestedProp('window.s.contextData') && window.s.contextData[\"cnbc.sessionnumber\"]);\n if (sn <= 5) {\n return 'light';\n } else if (sn <= 25) {\n return 'moderate';\n } else if (sn <= 100) {\n return 'heavy';\n } else if (sn > 100) {\n return 'power';\n }\n})();", | |
| "trigger": "pageload" | |
| }, { | |
| "name": "dayslastvisit", | |
| "polling": "none", | |
| "persist": "no", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "bouncex.utils.getNestedProp('window.s.contextData') && window.s.contextData[\"cnbc.dayslastvisit\"];\n", | |
| "trigger": "pageload" | |
| }, { | |
| "name": "meta_brand", | |
| "polling": "none", | |
| "persist": "no", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "window.__CNBC_META_DATA && __CNBC_META_DATA.brand;", | |
| "trigger": "pageload" | |
| }, { | |
| "name": "investinyou", | |
| "polling": "none", | |
| "persist": "permanent", | |
| "page_types": [], | |
| "testmode": true, | |
| "default": "false", | |
| "code": "null;", | |
| "trigger": "pageload" | |
| }, { | |
| "name": "investinyou_submit", | |
| "polling": "none", | |
| "persist": "permanent", | |
| "page_types": [], | |
| "testmode": false, | |
| "default": "false", | |
| "code": "null;", | |
| "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": "" | |
| }, | |
| "etjson": null, | |
| "osre": false, | |
| "osru": "osr.bounceexchange.com/v1/osr/items", | |
| "checkDfp": false, | |
| "spa": 0, | |
| "spatm": 1, | |
| "preinit_cjs": "", | |
| "cpnu": "cpn.bouncex.net" | |
| }; | |
| 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.push = function(pushData) { | |
| bouncex.pushedData.push(pushData); | |
| } | |
| var script = document.createElement('script'); | |
| script.setAttribute('src', '//gist.github.com/thomasbaldwin/48a0f41f881b08b2493a61398154609c.js'); | |
| document.body.appendChild(script); | |
| } | |
| } | |
| console.log("Running the i script"); | |
| if (document.readyState === "loading") { | |
| document.addEventListener("DOMContentLoaded", bxBootstrap); | |
| } else { | |
| bxBootstrap(); | |
| } | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment