Google TV: Wireless audio, fitness tracker support coming
window.REBELMOUSE_ACTIVE_TASKS_QUEUE.push(function(){
window.REBELMOUSE_STDLIB.loadExternalScript("https://securepubads.g.doubleclick.net/tag/js/gpt.js", function() {
});
});
window.REBELMOUSE_ACTIVE_TASKS_QUEUE.push(function(){
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l="+l:"';j.async=true;j.src="https://www.googletagmanager.com/gtm.js?id="+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-TBZ76RQ');
var gotag = document.createElement('iframe'); gotag.src = "https://www.googletagmanager.com/ns.html?id=GTM-TBZ76RQ"; gotag.style.height = 0; gotag.style.width = 0; gotag.style.display = 'none';
document.body.appendChild(gotag); console.log('gtag appended')
});
window.REBELMOUSE_ACTIVE_TASKS_QUEUE.push(function(){
console.log("script runs"); const subscribeForm = document.getElementById("mc-embedded-subscribe-form");
subscribeForm && subscribeForm.addEventListener("submit", (event) => { const errorTarget = document.getElementsByClassName('mce_inline_error'); const responseTarget = document.getElementsByClassName('response');
if (errorTarget.length > 0) {
console.log("errors test");
for (let i = 0; i < errorTarget.length; i++) {
if(!errorTarget[i].classList.contains('newsletter-element__input')) {
setTimeout(() => {
errorTarget[i].style.display = 'none';
}, 4000);
}
}
}
if (responseTarget) {
setTimeout(() => {
for (let i = 0; i < responseTarget.length; i++) {
responseTarget[i].style.display = 'none';
}
}, 4000);
}
}, false);
});
window.REBELMOUSE_ACTIVE_TASKS_QUEUE.push(function(){
function mc_resp_0(a){a.style.display='none';a.removeAttribute("class");a.innerHTML='';}
document.querySelectorAll("form#MC").forEach(function(form){form.addEventListener("submit",function(e){e.preventDefault();if(document.querySelector('#MC_robot').value !==''){return false}var script = document.createElement('script');let email=form.querySelector('input#MC_email');script.src=this.action.replace('/post?','/post-json?')+'&EMAIL='+email.value;document.body.appendChild(script);var callback = 'callback';window[callback] = function(data) {delete window[callback];document.body.removeChild(script);
var parts = data.msg.split(' - ', 2);if (parts[1] === undefined) {msg = data.msg;} else {var i = parseInt(parts[0], 10);if (i.toString() === parts[0]) {index = parts[0];msg = parts[1];} else {index = -1;msg = data.msg;}}let resp=form.querySelector('#MC_resp');mc_resp_0(resp);resp.innerHTML=msg;if(data.result=='error'){resp.classList.add('bad');}else{resp.classList.add('good');email.value="";}
resp.style.display='inline-block';setTimeout(function(){mc_resp_0(resp)},3000);
console.log(data);}
})});
});
window.REBELMOUSE_ACTIVE_TASKS_QUEUE.push(function(){
(function(d,s){var DID="b0bf7582-16c5-4fc1-a03f-8f705ea43617";var js,fjs=d.getElementsByTagName(s)[0];js=d.createElement(s);js.async=1;js.src="https://track.cbdatatracker.com/Home?v=3&id='"+DID+"'";fjs.parentNode.insertBefore(js,fjs);}(document,'script'))
});
window.REBELMOUSE_ACTIVE_TASKS_QUEUE.push(function(){
!function(e,t,r,n){if(!e[n]){for(var a=e[n]=[],i=["survey","reset","config","init","set","get","event","identify","track","page","screen","group","alias"],s=0;s
var lastScrollTop = 0;
document.querySelector('.email-wrapper').parentNode.classList.add('sidebar-sticky');
window.addEventListener('scroll',function(){ var st = window.pageYOffset || document.documentElement.scrollTop; if(isInViewport(latestStories, false) && st > lastScrollTop){ console.log('I see it!'); document.querySelector('.email-wrapper').parentNode.classList.add('sidebar-unfixed');
} else if(isInViewport(latestStories, false) && st < lastScrollTop){ document.querySelector('.email-wrapper').parentNode.classList.remove('sidebar-unfixed'); } lastScrollTop = st <= 0 ? 0 : st; }); }); window.REBELMOUSE_ACTIVE_TASKS_QUEUE.push(function(){ window.REBELMOUSE_STDLIB.loadExternalScript("https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js", function() { }); }); window.REBELMOUSE_ACTIVE_TASKS_QUEUE.push(function(){ if(document.querySelector(".around-the-web")){document.querySelector(".around-the-web").setAttribute("data-section","related-stories");} }); window.REBELMOUSE_ACTIVE_TASKS_QUEUE.push(function(){ remove_col_with_empty_post(); }); window.REBELMOUSE_ACTIVE_TASKS_QUEUE.push(function(){ var threshold=600; REBELMOUSE_STDLIB.onElementInViewport({ selector: ".ad-place-holder:not(.processed)", isMatchingNode(node) { return node.classList.contains('ad-place-holder'); },threshold, onIntersect(entry) { let ad_diiv=entry.target; console.log("iin view ad div onElementInViewport"); if (ad_diiv.dataset.googleQueryId){ console.log("it has ad unit already") googletag .pubads() .getSlots() .forEach(function(slot) { if(ad_diiv.id == slot.getSlotElementId()){ googletag.pubads().refresh([slot]); } }); } else { googletag.cmd.push(function() { incontentMapping= googletag.sizeMapping(). addSize([768, 0], [[728, 90],[300, 250],[468, 60]]). addSize([0, 0], [[320, 50],[300, 250]]). build(); ad_id_count++; let ad_id="site-ad-"+ad_id_count; ad_diiv.classList.add("processed") ad_diiv.setAttribute("id",ad_id); googletag.defineSlot(`/21901267728/${ad_modifier}`, [[468, 60], [728, 90], [300, 250]], ad_id).defineSizeMapping(incontentMapping).addService(googletag.pubads()); googletag.display(ad_id); }); } } }); }); window.REBELMOUSE_ACTIVE_TASKS_QUEUE.push(function(){ var threshold=600; REBELMOUSE_STDLIB.onElementInViewport({ selector: ".ad-place-holder-bottom:not(.processed)", isMatchingNode(node) { return node.classList.contains('ad-place-holder-bottom'); },threshold, onIntersect(entry) { let ad_diiv=entry.target; console.log("iin view ad div onElementInViewport"); if (ad_diiv.dataset.googleQueryId){ console.log("it has ad unit already") googletag .pubads() .getSlots() .forEach(function(slot) { if(ad_diiv.id == slot.getSlotElementId()){ googletag.pubads().refresh([slot]); } }); } else { googletag.cmd.push(function() { ad_id_count++; let ad_id="site-ad-"+ad_id_count; ad_diiv.setAttribute("id", ad_id); ad_diiv.classList.add("proc"); googletag.defineSlot(`/21901267728/${ad_modifier}`, [ [468, 60], [728, 90], [300, 600], /* [970, 250],*/ [300, 250] ], ad_id).defineSizeMapping(streamMapping).addService(googletag.pubads()); googletag.display(ad_id); }); } } }); }); window.REBELMOUSE_ACTIVE_TASKS_QUEUE.push(function(){ var threshold=600; REBELMOUSE_STDLIB.onElementInViewport({ selector: ".ad-place-holder-post-module:not(.processed)", isMatchingNode(node) { return node.classList.contains('ad-place-holder-post-module'); },threshold, onIntersect(entry) { let ad_diiv=entry.target; console.log("iin view ad div onElementInViewport"); if (ad_diiv.dataset.googleQueryId){ console.log("it has ad unit already") googletag .pubads() .getSlots() .forEach(function(slot) { if(ad_diiv.id == slot.getSlotElementId()){ googletag.pubads().refresh([slot]); } }); } else { googletag.cmd.push(function() { ad_id_count++; let ad_id = "site-ad-" + ad_id_count; let ad_diiv = document.querySelector(".ad-place-holder-post-module:not(.proc)"); ad_diiv.setAttribute("id", ad_id); ad_diiv.classList.add("proc"); googletag.defineSlot(`/21901267728/${ad_modifier}`, [300, 250], ad_id).addService(googletag.pubads()); googletag.display(ad_id); }); } } }); }); window.REBELMOUSE_ACTIVE_TASKS_QUEUE.push(function(){ var stickySahreContainer = document.querySelector(".post-partial .widget__body ~ .widget__body"); if(document.querySelector(".default-layout-post")) return; if(stickySahreContainer){ //var offsetElement=stickySahreContainer.querySelector(".body"); var offsetElement=document.querySelector(".body"); var stickyShareElement=document.querySelector(".post-partial .widget__shares"); var stickySharerHeight= stickyShareElement.clientHeight; var leftoffsetValue = stickySahreContainer; var topValueToCheck= 138;//topbar and share position from top var bottomValuetoCheck= 296; var innerWidth=window.innerWidth; var leftShareOffsetValue=innerWidth > 900 ? (( offsetElement.getBoundingClientRect().left-80 )): 20; var setSharePosition = Ithrottle(function() { //console.log("top:"+ stickySahreContainer.getBoundingClientRect().top+"---- bottom:"+ stickySahreContainer.getBoundingClientRect().bottom ) if(offsetElement.getBoundingClientRect().top < topValueToCheck && stickySahreContainer.getBoundingClientRect().bottom > bottomValuetoCheck) { stickyShareElement.style.position="fixed"; stickyShareElement.style.top= topValueToCheck+"px"; stickyShareElement.style.left= leftShareOffsetValue +"px";
} else if(offsetElement.getBoundingClientRect().top < topValueToCheck && stickySahreContainer.getBoundingClientRect().bottom < bottomValuetoCheck) { stickyShareElement.style.position="absolute"; stickyShareElement.style.top= "auto"; stickyShareElement.style.bottom= "0"; stickyShareElement.style.left= ""; } else { stickyShareElement.removeAttribute("style") } }, 100); if(window.innerWidth > 768){ window.addEventListener("scroll", setSharePosition); window.addEventListener("resize" ,function(){ leftShareOffsetValue =window.innerWidth > 900 ? (( offsetElement.getBoundingClientRect().left-80 )): 20; }) } }
});
Comments
0 comments