Browse Source

Up carbon

gh-pages
Artur Arseniev 3 years ago
parent
commit
6965701f3b
  1. 16
      js/carbon-v2.js

16
js/carbon-v2.js

@ -27,16 +27,18 @@ var loadScript = function(src, clb) {
return scr; return scr;
}; };
var loadNativeCarbon = () => {
var script = loadScript('https://cdn.carbonads.com/carbon.js?serve=CEAIVK77&placement=grapesjscom');
script.setAttribute('id', '_carbonads_js');
var adCont = document.getElementById('native-carbon');
adCont && adCont.appendChild(script);
}
function BSANativeCallback (a) { function BSANativeCallback (a) {
var total = a.ads.length; var total = a.ads.length;
if (!total) { !total && loadNativeCarbon()
var script = loadScript('//cdn.carbonads.com/carbon.js?serve=CEAIVK77&placement=grapesjscom');
script.setAttribute('id', '_carbonads_js');
var adCont = document.getElementById('native-carbon');
adCont && adCont.appendChild(script);
}
} }
if (['grapesjs.com', 'localhost'].indexOf(location.hostname) >= 0 ) { if (['grapesjs.com', 'localhost'].indexOf(location.hostname) >= 0 ) {
loadScript('//m.servedby-buysellads.com/monetization.js', loadAd); loadNativeCarbon();
} }

Loading…
Cancel
Save