|
|
|
@ -19,9 +19,23 @@ var loadAd = function() { |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
(function(){ |
|
|
|
var loadScript = function(src, clb) { |
|
|
|
var scr = document.createElement('script'); |
|
|
|
scr.src = '//m.servedby-buysellads.com/monetization.js'; |
|
|
|
scr.onload = loadAd; |
|
|
|
scr.src = src; |
|
|
|
clb && (scr.onload = clb); |
|
|
|
document.head.appendChild(scr); |
|
|
|
})(); |
|
|
|
return scr; |
|
|
|
}; |
|
|
|
|
|
|
|
function BSANativeCallback (a) { |
|
|
|
var total = a.ads.length; |
|
|
|
if (!total) { |
|
|
|
var script = loadScript('//cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=grapesjscom'); |
|
|
|
script.setAttribute('id', '_carbonads_js'); |
|
|
|
var adCont = document.getElementById('native-carbon'); |
|
|
|
adCont && adCont.appendChild(script); |
|
|
|
console.log({ script }); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
loadScript('//m.servedby-buysellads.com/monetization.js', loadAd); |
|
|
|
|