diff --git a/app/content/webviewPreload.js b/app/content/webviewPreload.js index b21a17d0812..177900a65aa 100644 --- a/app/content/webviewPreload.js +++ b/app/content/webviewPreload.js @@ -27,3 +27,126 @@ ipc.on('zoom-reset', function () { browserZoomLevel = 0 webFrame.setZoomLevel(browserZoomLevel) }) + +/** + * Ensures a node replacement div is visible and has a proper zIndex + */ +function ensureNodeVisible (node) { + if (document.defaultView.getComputedStyle(node).display === 'none') { + node.style.display = '' + } + if (document.defaultView.getComputedStyle(node).zIndex === '-1') { + node.style.zIndex = '' + } +} + +/** + * Determines the ad size which should be shown + * It will first check the node's size and try to infer that way. + * If that is not possible it will rely on the iframeData + * + * @param node The node that is being replaced + * @param iframeData The known preprocessed iframeData for that node + */ +function getAdSize (node, iframeData) { + var acceptableAdSizes = [ + [728, 90], + [300, 250], + [160, 600], + [320, 50] + ] + for (var i = 0; i < acceptableAdSizes.length; i++) { + var adSize = acceptableAdSizes[i] + if (node.offsetWidth === adSize[0] && node.offsetHeight >= adSize[1] || + node.offsetWidth >= adSize[0] && node.offsetHeight === adSize[1]) { + return adSize + } + } + + if (iframeData) { + return [iframeData.width, iframeData.height] + } + + return null +} + +/** + * Processes a single node which is an ad + * + * @param node The node of the ad to process + * @param iframeData The iframe data of the node to process from the slimerJS bot + * @param placeholderUrl The vault URL with encoded user ID and session ID to use + */ +function processAdNode (node, iframeData, placeholderUrl) { + if (!node) { + return + } + + var adSize = getAdSize(node, iframeData) + // Could not determine the ad size, so just skip this replacement + if (!adSize) { + return + } + var srcUrl = placeholderUrl + '&width=' + encodeURIComponent(adSize[0]) + '&height=' + encodeURIComponent(adSize[1]) + if (node.tagName === 'IFRAME') { + node.src = srcUrl + } else { + while (node.firstChild) { + node.removeChild(node.firstChild) + } + var iframe = document.createElement('iframe') + iframe.style.padding = 0 + iframe.style.border = 0 + iframe.style.margin = 0 + iframe.style.width = adSize[0] + 'px' + iframe.style.height = adSize[1] + 'px' + iframe.src = srcUrl + node.appendChild(iframe) + ensureNodeVisible(node) + if (node.parentNode) { + ensureNodeVisible(node.parentNode) + if (node.parentNode) { + ensureNodeVisible(node.parentNode.parentNode) + } + } + } +} + +// Fires when the browser has ad replacement information to give +ipc.on('set-ad-div-candidates', function (e, adDivCandidates, placeholderUrl) { + // Keep a lookup for skipped common elements + var fallbackNodeDataForCommon = {} + + // Process all of the specific ad information for this page + adDivCandidates.forEach(function (iframeData) { + var selector = '[id="' + iframeData.replaceId + '"]' + var node = document.querySelector(selector) + if (!node) { + return + } + + // Skip over known common elements + if (iframeData.replaceId.startsWith('google_ads_iframe_') || + iframeData.replaceId.endsWith('__container__')) { + fallbackNodeDataForCommon[node.id] = iframeData + return + } + + // Find the node and process it + processAdNode(document.querySelector(selector), iframeData, placeholderUrl) + }) + + // Common selectors which could be on every page + var commonSelectors = [ + '[id^="google_ads_iframe_"][id$="__container__"]' + ] + commonSelectors.forEach(commonSelector => { + var nodes = document.querySelectorAll(commonSelector) + if (!nodes) { + return + } + Array.from(nodes).forEach(node => { + processAdNode(node, fallbackNodeDataForCommon[node.id], placeholderUrl) + }) + }) +}) diff --git a/js/components/frame.js b/js/components/frame.js index d80000632d6..f01a435e0bb 100644 --- a/js/components/frame.js +++ b/js/components/frame.js @@ -7,6 +7,10 @@ const ReactDOM = require('react-dom') const AppActions = require('../actions/appActions') const ImmutableComponent = require('./immutableComponent') const cx = require('../lib/classSet.js') +const uuid = require('node-uuid') + +import adInfo from '../data/adInfo.js' +import Config from '../constants/config.js' class Frame extends ImmutableComponent { constructor () { @@ -17,6 +21,10 @@ class Frame extends ImmutableComponent { return ReactDOM.findDOMNode(this.refs.webview) } + componentDidMount () { + this.addEventListeners() + } + componentDidUpdate () { const activeShortcut = this.props.frame.get('activeShortcut') switch (activeShortcut) { @@ -48,55 +56,44 @@ class Frame extends ImmutableComponent { } } - componentDidMount () { + addEventListeners () { this.webview.addEventListener('new-window', (e) => { - console.log('new window: ' + e.url) AppActions.newFrame({ location: e.url }) }) this.webview.addEventListener('close', () => { - console.log('close window') }) this.webview.addEventListener('enter-html-full-screen', () => { - console.log('enter html full screen') }) this.webview.addEventListener('leave-html-full-screen', () => { - console.log('leave html full screen') }) this.webview.addEventListener('page-favicon-updated', () => { - console.log('favicon updated') }) this.webview.addEventListener('page-title-set', ({title}) => { - console.log('title set', title) AppActions.setFrameTitle(this.props.frame, title) }) - this.webview.addEventListener('dom-ready', () => { - console.log('dom is ready') + this.webview.addEventListener('dom-ready', (event) => { + this.insertAds(event.target.src) }) this.webview.addEventListener('load-commit', (event) => { if (event.isMainFrame) { let key = this.props.frame.get('key') - console.log('load committed', event.url, key) AppActions.setLocation(event.url, key) } }) this.webview.addEventListener('did-start-loading', () => { - console.log('spinner start loading') AppActions.onWebviewLoadStart( this.props.frame) }) this.webview.addEventListener('did-stop-loading', () => { - console.log('did stop loading') AppActions.onWebviewLoadEnd( this.props.frame, this.webview.getURL()) }) this.webview.addEventListener('did-fail-load', () => { - console.log('did fail load') }) this.webview.addEventListener('did-finish-load', () => { - console.log('did finish load') AppActions.updateBackForwardState( this.props.frame, this.webview.canGoBack(), @@ -104,6 +101,22 @@ class Frame extends ImmutableComponent { }) } + insertAds (currentLocation) { + let host = new window.URL(currentLocation).hostname.replace('www.', '') + let adDivCandidates = adInfo[host] + if (adDivCandidates) { + // TODO: Use a real user ID and sessionID + const userId = uuid.v4() + const sessionId = uuid.v4() + + const placeholderUrl = Config.vault.replacementUrl(userId) + '?' + [ + `sessionId=${sessionId}`, + `tagName=IFRAME` + ].join('&') + this.webview.send('set-ad-div-candidates', adDivCandidates, placeholderUrl) + } + } + goBack () { this.webview.goBack() } diff --git a/js/constants/config.js b/js/constants/config.js index 45ce1a13207..47b1bdeab9e 100644 --- a/js/constants/config.js +++ b/js/constants/config.js @@ -2,7 +2,11 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ -var vaultHost = process.env.VAULT_HOST || 'http://localhost:3000' +// VAULT_HOST can be set to: +// https://vault.brave.com for production +// https://vault-staging.brave.com for a dev build +// http://localhost:3000 for production +var vaultHost = process.env.VAULT_HOST || 'https://vault-staging.brave.com' export default { zoom: { diff --git a/js/data/adInfo.js b/js/data/adInfo.js new file mode 100644 index 00000000000..ab688f58e99 --- /dev/null +++ b/js/data/adInfo.js @@ -0,0 +1,2 @@ +let adInfo = {"news.yahoo.com":[{"width":728,"height":90,"replaceId":"yom-ad-LDRB"},{"width":300,"height":250,"replaceId":"yom-ad-LREC"},{"width":300,"height":250,"replaceId":"yom-ad-LREC2"}],"rd.com":[{"width":300,"height":250,"replaceId":"google_ads_iframe_/7234/rdg/homepage_0__container__"},{"width":300,"height":250,"replaceId":"rdg_homepage-auto-gen-id-2"},{"width":300,"height":250,"replaceId":"rdg_homepage-auto-gen-id-3"}],"slashdot.org":[{"width":728,"height":90,"replaceId":"div-gpt-ad-728x90_a"},{"width":728,"height":90,"replaceId":"div-gpt-ad-728x90_b"},{"width":300,"height":250,"replaceId":"div-gpt-ad-300x250_a"},{"width":300,"height":250,"replaceId":"slashdot_deals-content"},{"width":300,"height":250,"replaceId":"div-gpt-ad-300x250_b"},{"width":300,"height":250,"replaceId":"div-gpt-ad-300x250_c"},{"width":300,"height":250,"replaceId":"div-gpt-ad-300x250_d"}],"cnn.com":[{"width":300,"height":250,"replaceId":"google_ads_iframe_/8663477/CNN/homepage_1__container__"},{"width":300,"height":250,"replaceId":"ad_rect_btf_02"}],"huffingtonpost.com":[],"reddit.com":[],"google.com":[],"facebook.com":[],"youtube.com":[],"baidu.com":[],"wikipedia.org":[],"taobao.com":[],"twitter.com":[],"live.com":[{"width":320,"height":50,"replaceId":"i0272"}],"linkedin.com":[],"sina.com.cn":[],"amazon.com":[],"hao123.com":[],"google.co.in":[],"blogspot.com":[],"weibo.com":[],"wordpress.com":[],"360.cn":[],"yandex.ru":[],"yahoo.co.jp":[],"bing.com":[],"tmall.com":[],"vk.com":[],"ebay.com":[{"width":300,"height":250,"replaceId":"rtm_iframe_226"}],"sohu.com":[],"google.de":[],"pinterest.com":[],"163.com":[{"width":300,"height":250,"replaceId":"m1"},{"width":300,"height":250,"replaceId":"m1"},{"width":300,"height":250,"replaceId":"m2"},{"width":300,"height":250,"replaceId":"layout-ad-r3"},{"width":300,"height":250,"replaceId":"m1"},{"width":300,"height":250,"replaceId":"m3"},{"width":300,"height":250,"replaceId":"m4"}],"ask.com":[],"google.co.uk":[],"soso.com":[],"google.fr":[],"msn.com":[],"tumblr.com":[],"google.co.jp":[],"mail.ru":[{"width":300,"height":250,"replaceId":""}],"instagram.com":[],"microsoft.com":[],"google.com.br":[],"google.ru":[],"xvideos.com":[],"paypal.com":[],"imdb.com":[],"google.es":[],"apple.com":[],"google.it":[],"xinhuanet.com":[],"amazon.co.jp":[],"craigslist.org":[],"neobux.com":[],"imgur.com":[],"xhamster.com":[],"stackoverflow.com":[],"ifeng.com":[],"google.com.mx":[],"bbc.co.uk":[],"google.com.hk":[],"adcash.com":[],"blogger.com":[],"fc2.com":[],"google.ca":[],"t.co":[],"akamaihd.net":[],"go.com":[],"people.com.cn":[],"wordpress.org":[],"about.com":[{"width":300,"height":250,"replaceId":"billboard"}],"adobe.com":[],"alipay.com":[],"odnoklassniki.ru":[],"conduit.com":[],"youku.com":[],"googleusercontent.com":[],"gmw.cn":[],"google.com.tr":[],"alibaba.com":[],"aliexpress.com":[],"pornhub.com":[],"godaddy.com":[],"amazon.de":[],"google.com.au":[],"blogspot.in":[],"ebay.de":[{"width":300,"height":250,"replaceId":"rtm_iframe_1602"}],"netflix.com":[],"kickass.to":[],"google.pl":[],"ku6.com":[],"bp.blogspot.com":[],"thepiratebay.se":[],"dailymotion.com":[],"weather.com":[],"vimeo.com":[],"dailymail.co.uk":[{"width":300,"height":250,"replaceId":"p-776"},{"width":300,"height":250,"replaceId":"p-1672"},{"width":300,"height":250,"replaceId":"p-1676"},{"width":300,"height":250,"replaceId":"p-1724"}],"cnet.com":[{"width":300,"height":250,"replaceId":"mpu-top-5604101b8679b"},{"width":300,"height":250,"replaceId":"mpu-bottom-5604101b8679b"},{"width":728,"height":90,"replaceId":"google_ads_iframe_/8264/aw-cnet/home_3__container__"}],"espn.go.com":[{"width":320,"height":50,"replaceId":"google_ads_iframe_/6444/espn.com/frontpage/index_1__container__"}],"xnxx.com":[],"ebay.co.uk":[{"width":300,"height":250,"replaceId":"rtm_iframe_1602"}],"rakuten.co.jp":[],"indiatimes.com":[{"width":728,"height":90,"replaceId":"ad1"},{"width":728,"height":90,"replaceId":"pubToolbar_banner"}],"themeforest.net":[],"livejasmin.com":[],"aol.com":[{"width":320,"height":50,"replaceId":"atwAdFrame2"}],"amazonaws.com":[],"uol.com.br":[{"width":300,"height":250,"replaceId":"google_ads_iframe_/8804/uol/home/300x250_top_0"},{"width":300,"height":250,"replaceId":"google_ads_iframe_/8804/uol/home/300x250_middle_0"},{"width":300,"height":250,"replaceId":"banner-300x250-10"},{"width":300,"height":250,"replaceId":"banner-300x250-14"},{"width":728,"height":90,"replaceId":"banner-728x90-1"}],"redtube.com":[],"amazon.co.uk":[{"width":300,"height":250,"replaceId":""}],"youporn.com":[],"google.com.sa":[],"dropbox.com":[],"google.com.ar":[],"nytimes.com":[],"slideshare.net":[],"google.com.eg":[],"pixnet.net":[],"globo.com":[],"adf.ly":[],"china.com":[{"width":728,"height":90,"replaceId":"starIframe_wrapper_1"}],"secureserver.net":[],"m2newmedia.com":[],"directrev.com":[],"buzzfeed.com":[{"width":300,"height":250,"replaceId":"div-gpt-ad-13"}],"mozilla.org":[],"wikimedia.org":[],"fiverr.com":[],"google.com.pk":[],"ameblo.jp":[],"booking.com":[],"google.nl":[],"livejournal.com":[],"deviantart.com":[{"width":300,"height":250,"replaceId":"sleek-browse-ad-target"}],"yelp.com":[{"width":300,"height":250,"replaceId":"yelp_us_welcome_300x250"}],"sogou.com":[],"google.com.tw":[],"flipkart.com":[],"wikia.com":[],"hootsuite.com":[],"blogfa.com":[],"developunit.info":[],"etsy.com":[],"outbrain.com":[],"wikihow.com":[],"avg.com":[],"google.co.th":[],"clkmon.com":[],"google.co.za":[],"stumbleupon.com":[],"soundcloud.com":[],"livedoor.com":[{"width":300,"height":250,"replaceId":"aswift_0_expand"},{"width":300,"height":250,"replaceId":"aswift_1_expand"},{"width":300,"height":250,"replaceId":"aswift_2_expand"}],"4shared.com":[],"w3schools.com":[],"badoo.com":[],"sourceforge.net":[{"width":160,"height":600,"replaceId":"div-gpt-ad-1392148098424-0"},{"width":728,"height":90,"replaceId":"SF_HP_728x90_A_wrapped"},{"width":300,"height":250,"replaceId":"SF_HP_300x250_C_wrapped"},{"width":728,"height":90,"replaceId":"SF_HP_728x90_B_wrapped"}],"files.wordpress.com":[],"archive.org":[],"mediafire.com":[],"torrentz.eu":[],"google.co.ve":[],"theguardian.com":[],"liveinternet.ru":[],"bankofamerica.com":[],"addthis.com":[],"aweber.com":[],"forbes.com":[],"foxnews.com":[{"width":300,"height":250,"replaceId":"desktop-300x600_300x250"}],"ask.fm":[],"indeed.com":[],"chase.com":[],"bet365.com":[],"salesforce.com":[],"gameforge.com":[],"hostgator.com":[],"naver.com":[],"espncricinfo.com":[{"width":320,"height":50,"replaceId":"google_ads_iframe_/6444/espn.cricinfo.com/homepage_1__container__"},{"width":300,"height":250,"replaceId":"ad-slot-incontent-843035"},{"width":300,"height":250,"replaceId":"ad-slot-incontent-84456"}],"skype.com":[],"google.gr":[],"github.com":[],"softonic.com":[{"width":728,"height":90,"replaceId":"google_ads_iframe_/5302/Desktop/Desktop-Web-ES/Homepage_1"},{"width":300,"height":250,"replaceId":"google_ads_iframe_/5302/Desktop-Passback/Desktop-Web-ES/Homepage_0__container__"}],"statcounter.com":[],"google.com.co":[],"google.co.id":[],"reference.com":[{"width":728,"height":90,"replaceId":"rcomPUHPTop-728x90"},{"width":300,"height":250,"replaceId":"rcomPUHPTop-300x250"},{"width":300,"height":250,"replaceId":"rcomPUHPBtm-300x251"}],"onet.pl":[],"spiegel.de":[{"width":160,"height":600,"replaceId":"ftdiv1394705"}],"nicovideo.jp":[],"shutterstock.com":[],"google.be":[],"allegro.pl":[],"walmart.com":[],"google.com.ua":[],"google.com.vn":[],"google.com.ng":[],"mailchimp.com":[],"tube8.com":[],"stackexchange.com":[],"sharelive.net":[],"so.com":[],"gamer.com.tw":[],"tripadvisor.com":[],"zillow.com":[],"wsj.com":[{"width":300,"height":250,"replaceId":"google_ads_iframe_/2/interactive.wsj.com/front_0__container__"}],"wix.com":[],"popads.net":[],"loading-delivery1.com":[],"google.ro":[],"wellsfargo.com":[],"goo.ne.jp":[{"width":300,"height":250,"replaceId":"div-gpt-ad-1441173778524-0"}],"bild.de":[{"width":300,"height":250,"replaceId":"sas_16267"}],"photobucket.com":[{"width":728,"height":90,"replaceId":"bannerAd"}],"pandora.com":[],"google.se":[],"bleacherreport.com":[{"width":320,"height":50,"replaceId":"google_ads_iframe_/8663477/BR/home_page/main/desk_0__container__"}],"pcpop.com":[],"media.tumblr.com":[],"naver.jp":[{"width":300,"height":250,"replaceId":"yads_2873338-0"}],"warriorforum.com":[],"babylon.com":[],"zedo.com":[],"weebly.com":[],"google.dz":[],"taringa.net":[{"width":300,"height":250,"replaceId":"sas_4119699_iframe"}],"blogspot.com.es":[],"google.at":[],"rutracker.org":[],"php.net":[],"google.com.ph":[],"ups.com":[],"leboncoin.fr":[],"mashable.com":[],"businessinsider.com":[{"width":728,"height":90,"replaceId":"ad-982254f9-b25f-4493-d7df-3d20a1ca5469"}],"goodreads.com":[{"width":300,"height":250,"replaceId":"div-gpt-ad-895082b7f9"}],"quikr.com":[{"width":300,"height":250,"replaceId":"div-gpt-ad-1437376906012-0"}],"usatoday.com":[],"dmm.co.jp":[],"ucoz.ru":[],"gmx.net":[{"width":300,"height":250,"replaceId":""}],"rambler.ru":[{"width":300,"height":250,"replaceId":"adfox-banner-recommendations-1"},{"width":300,"height":250,"replaceId":"adfox-banner-recommendations-2"},{"width":300,"height":250,"replaceId":"adfox-banner-recommendations-3"}],"rediff.com":[],"domaintools.com":[],"telegraph.co.uk":[{"width":728,"height":90,"replaceId":"google_ads_iframe_/6582/tmg.telegraph.portal/portal_0"},{"width":300,"height":250,"replaceId":"tmgads_legacy_mpu_2"}],"google.com.pe":[],"comcast.net":[],"intuit.com":[],"kaskus.co.id":[{"width":728,"height":90,"replaceId":"div-gpt-ad-top-leaderboard"},{"width":300,"height":250,"replaceId":"div-gpt-ad-r1"},{"width":300,"height":250,"replaceId":"div-gpt-ad-r2"},{"width":300,"height":250,"replaceId":"div-gpt-ad-r3"}],"tianya.cn":[],"avito.ru":[],"ettoday.net":[{"width":300,"height":250,"replaceId":"adJS01-8240"},{"width":300,"height":250,"replaceId":"adJS01-17296"}],"thefreedictionary.com":[],"wp.pl":[],"ikea.com":[],"google.ch":[],"amazon.fr":[],"lpcloudsvr302.com":[],"goal.com":[{"width":728,"height":90,"replaceId":""},{"width":300,"height":250,"replaceId":"f8-003"}],"hurriyet.com.tr":[{"width":300,"height":250,"replaceId":"medyanet_hurriyet_anasayfa_300x250_6648"}],"uploaded.net":[],"baomihua.com":[],"usps.com":[],"coccoc.com":[],"moz.com":[],"google.cl":[],"google.pt":[],"thefreecamsecret.com":[],"codecanyon.net":[],"adrotator.se":[],"goodgamestudios.com":[],"twitch.tv":[{"width":300,"height":250,"replaceId":"Twitch_FPMedRect_holder"}],"google.com.bd":[],"ci123.com":[],"google.com.sg":[],"fedex.com":[],"nbcnews.com":[],"web.de":[{"width":300,"height":250,"replaceId":""}],"onclickads.net":[],"it168.com":[],"bitly.com":[],"google.ae":[],"washingtonpost.com":[],"ehow.com":[],"milliyet.com.tr":[{"width":160,"height":600,"replaceId":"sol"},{"width":728,"height":90,"replaceId":"Gad-1"},{"width":300,"height":250,"replaceId":"Gad-7"}],"google.co.kr":[],"suning.com":[],"9gag.com":[{"width":300,"height":250,"replaceId":"div-gpt-ad-1386120113080-2-26489"},{"width":300,"height":250,"replaceId":"div-gpt-ad-1386120113080-0-10976"},{"width":300,"height":250,"replaceId":"div-gpt-ad-1386120113080-3-43668"}],"delta-search.com":[],"hp.com":[],"disqus.com":[],"samsung.com":[],"sochi2014.com":[],"bitauto.com":[],"xuite.net":[{"width":728,"height":90,"replaceId":"index-ad-mid02"}],"daum.net":[],"meetup.com":[],"varzesh3.com":[],"doublepimp.com":[],"olx.in":[],"myntra.com":[],"snapdeal.com":[],"scribd.com":[],"extratorrent.cc":[{"width":300,"height":250,"replaceId":""}],"infusionsoft.com":[],"4dsply.com":[],"mercadolivre.com.br":[],"tmz.com":[{"width":728,"height":90,"replaceId":"wbad-tmz-2"},{"width":300,"height":250,"replaceId":"google_ads_iframe_/55153744/tmz/home_1"},{"width":300,"height":250,"replaceId":"google_ads_iframe_/55153744/tmz/home_2__container__"},{"width":300,"height":250,"replaceId":"google_ads_iframe_/55153744/tmz/home_3__container__"},{"width":300,"height":250,"replaceId":"google_ads_iframe_/55153744/tmz/home_4__container__"},{"width":300,"height":250,"replaceId":"google_ads_iframe_/55153744/tmz/home_5__container__"},{"width":300,"height":250,"replaceId":"google_ads_iframe_/55153744/tmz/home_6__container__"}],"orange.fr":[],"google.cz":[],"constantcontact.com":[],"chinaz.com":[],"nih.gov":[],"eazel.com":[{"width":300,"height":250,"replaceId":""},{"width":728,"height":90,"replaceId":""}],"accuweather.com":[{"width":728,"height":90,"replaceId":"header-davek"},{"width":300,"height":250,"replaceId":"top-panel-body-rt-body-ps"},{"width":300,"height":250,"replaceId":"bottom-panel-body-ps"},{"width":728,"height":90,"replaceId":"google_ads_iframe_/6581/accuwx.world.home/country_3__container__"}],"java.com":[],"hulu.com":[],"bloomberg.com":[],"free.fr":[],"xywy.com":[],"detik.com":[{"width":728,"height":90,"replaceId":"leaderboard"},{"width":300,"height":250,"replaceId":"scr1"},{"width":300,"height":250,"replaceId":"scr2"},{"width":300,"height":250,"replaceId":"scr3"},{"width":300,"height":250,"replaceId":"scr4"},{"width":300,"height":250,"replaceId":"scr5"},{"width":300,"height":250,"replaceId":"scr5"}],"libero.it":[{"width":728,"height":90,"replaceId":"libero_header_adv"},{"width":300,"height":250,"replaceId":"bantwo"},{"width":728,"height":90,"replaceId":"google_ads_iframe_/5180/libero/hp/foot_0__container__"}],"speedtest.net":[{"width":728,"height":90,"replaceId":"div-gpt-ad-1426720765154-6"},{"width":160,"height":600,"replaceId":"div-gpt-ad-1426720765154-11"},{"width":300,"height":250,"replaceId":"div-gpt-ad-1426720765154-13"},{"width":300,"height":250,"replaceId":"div-gpt-ad-1426720765154-0"},{"width":728,"height":90,"replaceId":"div-gpt-ad-1426720765154-7"}],"mobile01.com":[{"width":300,"height":250,"replaceId":"ad_57585"}],"clickbank.com":[],"microsoftonline.com":[],"yandex.ua":[],"gsmarena.com":[{"width":728,"height":90,"replaceId":"aswift_1_expand"},{"width":300,"height":250,"replaceId":"aswift_2_expand"}],"chaturbate.com":[{"width":160,"height":600,"replaceId":""},{"width":160,"height":600,"replaceId":""},{"width":160,"height":600,"replaceId":""},{"width":300,"height":250,"replaceId":""},{"width":300,"height":250,"replaceId":""}],"bluehost.com":[],"bbc.com":[{"width":320,"height":50,"replaceId":"leaderboard_ad_container"},{"width":300,"height":250,"replaceId":"mpu_ad_container"}],"time.com":[{"width":728,"height":90,"replaceId":"tim_1"}],"webmd.com":[{"width":728,"height":90,"replaceId":"google_ads_iframe_/4312434/consumer/webmd/hp-conwbmd_0__container__"}],"marca.com":[{"width":300,"height":250,"replaceId":"div-gpt-ad-portada_r"},{"width":300,"height":250,"replaceId":"div-gpt-ad-portada_rc"},{"width":300,"height":250,"replaceId":"div-gpt-ad-portada_rd"},{"width":300,"height":250,"replaceId":"div-gpt-ad-portada_re"},{"width":300,"height":250,"replaceId":"div-gpt-ad-portada_rf"},{"width":728,"height":90,"replaceId":"DfaVisibilityIdentifier_1443108776922"},{"width":300,"height":250,"replaceId":"div-gpt-ad-portada_rg"},{"width":728,"height":90,"replaceId":"div-gpt-ad-portada_mb"}],"youjizz.com":[{"width":728,"height":90,"replaceId":"baner_top"}],"hudong.com":[],"kooora.com":[{"width":300,"height":250,"replaceId":"div-gpt-ad-1397046058597-2"}],"histats.com":[],"beeg.com":[],"motherless.com":[{"width":300,"height":250,"replaceId":""},{"width":300,"height":250,"replaceId":""},{"width":300,"height":250,"replaceId":""}],"caijing.com.cn":[],"xing.com":[],"americanexpress.com":[],"kwejk.pl":[{"width":300,"height":250,"replaceId":"AMIfr_10375966_1_17140726_f81935"}],"ad6media.fr":[],"cj.com":[],"in.com":[{"width":728,"height":90,"replaceId":"google_ads_iframe_/1039154/IN.com/IN_HP/IN_HP_728x90_0"},{"width":300,"height":250,"replaceId":"IN.com/IN_Flying/IN_Flying_300x250"}],"bestbuy.com":[],"zippyshare.com":[],"mywebsearch.com":[],"google.co.hu":[],"nba.com":[{"width":728,"height":90,"replaceId":"google_ads_iframe_/8663477/NBA/homepage_1"},{"width":300,"height":250,"replaceId":"ad_rect_btf_01"},{"width":728,"height":90,"replaceId":"ad_bnr_btf_01"}],"adnxs.com":[],"elpais.com":[{"width":728,"height":90,"replaceId":"elpais_gpt-LDB1_ad_container"},{"width":300,"height":250,"replaceId":"D149737268_89411417228"},{"width":300,"height":250,"replaceId":"D149737268_89411421068"},{"width":300,"height":250,"replaceId":"D121336748_63219531308"},{"width":300,"height":250,"replaceId":"D121315268_63278198228"},{"width":300,"height":250,"replaceId":"D121336748_63219592508"},{"width":728,"height":90,"replaceId":"elpais_gpt-LDB3_ad_container"}],"amazon.cn":[{"width":300,"height":250,"replaceId":"DAr2"},{"width":300,"height":250,"replaceId":"DAr7-a"},{"width":300,"height":250,"replaceId":"DAr7"},{"width":300,"height":250,"replaceId":"DAr7-b"}],"intoday.in":[],"tinyurl.com":[{"width":728,"height":90,"replaceId":"tfasyncframe_2"},{"width":300,"height":250,"replaceId":"cto_iframe_80e2465e21"}],"google.no":[],"ign.com":[{"width":728,"height":90,"replaceId":"sugarad-728x90"},{"width":300,"height":250,"replaceId":"sugarad-300x250"},{"width":300,"height":250,"replaceId":"sugarad-side300x250"},{"width":728,"height":90,"replaceId":"sugarad-s728x90"}],"cloudfront.net":[],"hardsextube.com":[],"hdfcbank.com":[],"ebay.in":[{"width":300,"height":250,"replaceId":"rtm_iframe_1602"}],"snapdo.com":[],"lenta.ru":[{"width":728,"height":90,"replaceId":"AdFox_plug_RUB893612377"},{"width":300,"height":250,"replaceId":"ban_240x400"}],"techcrunch.com":[{"width":300,"height":250,"replaceId":"adsDiv7f9561968f"}],"google.ie":[],"getresponse.com":[],"force.com":[],"irs.gov":[],"tagged.com":[],"zendesk.com":[],"pof.com":[],"rt.com":[{"width":320,"height":50,"replaceId":"div-gpt-ad-1432640570396-0"},{"width":320,"height":50,"replaceId":"div-gpt-ad-1432640570396-1"},{"width":300,"height":250,"replaceId":"div-gpt-ad-1432640570396-2"}],"cnzz.com":[],"repubblica.it":[],"google.az":[],"douban.com":[],"plugrush.com":[],"groupon.com":[{"width":728,"height":90,"replaceId":"div-gpt-atf-728-90"},{"width":728,"height":90,"replaceId":"div-gpt-ad-1425343089352-0"}],"siteadvisor.com":[],"google.cn":[],"seznam.cz":[],"ero-advertising.com":[],"kakaku.com":[{"width":300,"height":250,"replaceId":"div-gpt-ad-k/top_300x250"},{"width":300,"height":250,"replaceId":"aswift_0_expand"}],"w3.org":[],"elmundo.es":[{"width":728,"height":90,"replaceId":"div-gpt-ad-portada_m"},{"width":300,"height":250,"replaceId":"div-gpt-ad-portada_r"},{"width":300,"height":250,"replaceId":"div-gpt-ad-portada_rb"},{"width":300,"height":250,"replaceId":"div-gpt-ad-portada_rc"}],"xe.com":[],"feedly.com":[],"list-manage.com":[],"t-online.de":[{"width":300,"height":250,"replaceId":"div_2405216109106406"},{"width":300,"height":250,"replaceId":"div_5311792109106862"}],"dell.com":[],"nydailynews.com":[{"width":728,"height":90,"replaceId":"google_ads_iframe_4692832/NYDN/Homepage_1"},{"width":300,"height":250,"replaceId":"div-gpt-ad-x50"},{"width":300,"height":250,"replaceId":"div-gpt-ad-x55"},{"width":300,"height":250,"replaceId":"div-gpt-ad-x86"},{"width":728,"height":90,"replaceId":"google_ads_iframe_4692832/NYDN/Homepage_5"}],"amazon.in":[],"cntv.cn":[],"ameba.jp":[{"width":728,"height":90,"replaceId":"advertiseBnr"}],"jrj.com.cn":[],"surveymonkey.com":[],"target.com":[{"width":300,"height":250,"replaceId":"google_ads_iframe_/7079046/target/homepage_0__container__"}],"ebay.com.au":[],"odesk.com":[],"uimserv.net":[],"okcupid.com":[],"ce.cn":[],"rbc.ru":[],"doorblog.jp":[],"joomla.org":[],"doubleclick.com":[],"upworthy.com":[],"habrahabr.ru":[],"zimbio.com":[{"width":300,"height":250,"replaceId":"topMREC"}],"life.com.tw":[{"width":300,"height":250,"replaceId":"aswift_0_expand"}],"naukri.com":[],"istockphoto.com":[],"zing.vn":[],"ebay.it":[{"width":300,"height":250,"replaceId":"rtm_iframe_1602"}],"jimdo.com":[],"fbcdn.net":[],"blogspot.de":[],"google.co.il":[],"mama.cn":[],"google.dk":[],"blackhatworld.com":[{"width":728,"height":90,"replaceId":"div-gpt-ad-1418404259802-2"}],"webmoney.ru":[],"lenovo.com":[],"flipora.com":[],"freelancer.com":[],"latimes.com":[{"width":320,"height":50,"replaceId":"google_ads_iframe_/4011/trb.latimes/hp_0__container__"},{"width":300,"height":250,"replaceId":"trb_ad_outfitAd_1_2_/"},{"width":300,"height":250,"replaceId":"google_ads_iframe_/4011/trb.latimes/hp_2__container__"},{"width":300,"height":250,"replaceId":"trb_ad_outfitAd_3_5_/"},{"width":300,"height":250,"replaceId":"trb_ad_outfitAd_4_6_/"}],"gazeta.pl":[],"justdial.com":[],"eyny.com":[],"match.com":[],"pcbaby.com.cn":[],"retailmenot.com":[],"4399.com":[],"drudgereport.com":[{"width":300,"height":250,"replaceId":"cto_iframe_66ad7085d6"},{"width":300,"height":250,"replaceId":"cto_iframe_6973fe5241"}],"quora.com":[],"ixxx.com":[],"informer.com":[],"att.com":[],"mysearchdial.com":[],"sahibinden.com":[{"width":300,"height":250,"replaceId":"div-gpt-ad-31667776-0"}],"google.fi":[],"capitalone.com":[],"elance.com":[],"icicibank.com":[],"teensdigest.com":[],"goo.gl":[],"probux.com":[],"issuu.com":[{"width":300,"height":250,"replaceId":"div_stream_ads_element_0"},{"width":300,"height":250,"replaceId":"div_stream_ads_element_1"}],"ig.com.br":[{"width":728,"height":90,"replaceId":""},{"width":300,"height":250,"replaceId":""},{"width":300,"height":250,"replaceId":""},{"width":320,"height":50,"replaceId":""},{"width":320,"height":50,"replaceId":""},{"width":320,"height":50,"replaceId":""},{"width":320,"height":50,"replaceId":""},{"width":320,"height":50,"replaceId":""},{"width":320,"height":50,"replaceId":""},{"width":300,"height":250,"replaceId":""},{"width":300,"height":250,"replaceId":""},{"width":300,"height":250,"replaceId":""}],"twoo.com":[],"qtrax.com":[],"pch.com":[],"blogspot.ru":[],"lifehacker.com":[{"width":300,"height":250,"replaceId":"google_ads_iframe_/4246/gm.lifehacker/front_2__container__"}],"subscene.com":[{"width":300,"height":250,"replaceId":"aswift_0_expand"},{"width":300,"height":250,"replaceId":"aswift_1_expand"},{"width":728,"height":90,"replaceId":"aswift_2_expand"}],"jabong.com":[],"blogspot.it":[],"hypergames.net":[],"livescore.com":[{"width":160,"height":600,"replaceId":""}],"empowernetwork.com":[],"iminent.com":[],"xgo.com.cn":[],"irctc.co.in":[{"width":300,"height":250,"replaceId":"aswift_0_expand"},{"width":300,"height":250,"replaceId":"div-gpt-ad-597399901797237433-2"}],"sberbank.ru":[],"foxsports.com":[{"width":320,"height":50,"replaceId":"adcontainer725185406-r14"}],"kinopoisk.ru":[],"exoclick.com":[],"rednet.cn":[],"pcgames.com.cn":[],"ning.com":[],"lady8844.com":[],"wideinfo.org":[{"width":728,"height":90,"replaceId":"cto_iframe_0b81467394"}],"webcrawler.com":[],"yesky.com":[],"trulia.com":[],"zeobit.com":[],"searchfun.in":[],"babytree.com":[],"youm7.com":[{"width":728,"height":90,"replaceId":"div-gpt-ad-1379418687595-1"},{"width":728,"height":90,"replaceId":"div-gpt-ad-1420547156067-0"},{"width":300,"height":250,"replaceId":"div-gpt-ad-1379418687595-3"}],"123rf.com":[],"commentcamarche.net":[]}; +export default adInfo; diff --git a/package.json b/package.json index 1919cbc64fe..853b6baaa8e 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "less-loader": "^2.2.1", "mocha": "^2.3.4", "node-libs-browser": "^0.5.3", + "node-uuid": "^1.4.7", "pre-commit": "^1.1.2", "spectron": "^0.35.3", "standard": "^5.4.1", @@ -73,6 +74,7 @@ "Brave-darwin-x64/**", "less/**", "res/**", + "js/data/**", "dist/**", "doc/**", "public/**",