1var dfpCounter = 15; 2 3function dfpTimer() { 4 if (dfpCounter > 0) { 5 dfpCounter -= 1; 6 } 7 setTimeout("dfpTimer()", 1000); 8} 9 10jQuery(document).ready(function ($) { 11 var $dfpTallBanner = $('#dfp-right'); 12 var padding = 10; // Tall banner top-padding 13 var minTop = $('#masthead').height(); 14 var width0 = 825; 15 var width1 = 1050; 16 var widthVersion = 2; 17 var windowWidth = $(window).width(); 18 if (windowWidth <= width1) { 19 widthVersion = 1; 20 } 21 if (windowWidth <= width0) { 22 widthVersion = 0; 23 } 24 25//var isWide = ($(window).width() > minWidth); 26 27 function adjustTallBannerTop() { 28 var variance = minTop - $(document).scrollTop(); 29 $dfpTallBanner.css('top', (variance > 0 ? variance + padding : padding) + 'px'); 30 } 31 32 function cleanupBanners() { 33 var tempWindowWidth = $(window).width(); 34 if (widthVersion !== 0 && tempWindowWidth <= width0) { 35 widthVersion = 0; 36 dfpRefresh(true); 37 } else if (widthVersion !== 1 && tempWindowWidth > width0 && tempWindowWidth <= width1) { 38 widthVersion = 1; 39 dfpRefresh(true); 40 } else if (widthVersion !== 2 && tempWindowWidth > width1) { 41 widthVersion = 2; 42 dfpRefresh(true); 43 } 44 } 45 46 $(window).scroll(adjustTallBannerTop); 47 $(window).resize(cleanupBanners); 48 adjustTallBannerTop(); 49 setTimeout("dfpTimer()", 1000); 50 $(document).on('click', '.gsnaction', function (e) { 51 dfpRefresh(false); 52 }); 53 function dfpRefresh(force) { 54 if (force || dfpCounter <= 0) { 55 googletag.pubads().refresh(); 56 if (dfpCounter <= 0 && (typeof S !== 'undefined') && (typeof S.inmobi !== 'undefined')) { 57 S.inmobi.refreshAd(); 58 } 59 dfpCounter = 15; 60 } 61 } 62});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.