1jQuery(document).ready(function ($) { 2 console.log("DFP Refresh Start..."); 3 //console.log("auto_refresh_settings: ", auto_refresh_settings); 4 //console.log("Status: ", auto_refresh_settings.status); 5 //console.log("Timer: ", auto_refresh_settings.timer); 6 //console.log("googletag: ", googletag); 7 if( auto_refresh_settings.status == 1){ 8 //console.log("status: True"); 9 var set_interval_id = setInterval(function() { 10 googletag.cmd.push(function() { 11 jQuery('.slot-unique-id').each(function() { 12 var currentElement = $(this); 13 14 var currentValue = currentElement.val(); 15 16 switch (currentValue) { 17 case "slot1": 18 //console.log("Slot Unique ID:::", currentValue); 19 googletag.pubads().refresh([slot1]); 20 break; 21 case "slot2": 22 //console.log("Slot Unique ID:::", currentValue); 23 googletag.pubads().refresh([slot2]); 24 break; 25 case "slot3": 26 //console.log("Slot Unique ID:::", currentValue); 27 googletag.pubads().refresh([slot3]); 28 break; 29 case "slot4": 30 //console.log("Slot Unique ID:::", currentValue); 31 googletag.pubads().refresh([slot4]); 32 break; 33 case "slot5": 34 //console.log("Slot Unique ID:::", currentValue); 35 googletag.pubads().refresh([slot5]); 36 break; 37 case "slot6": 38 //console.log("Slot Unique ID:::", currentValue); 39 googletag.pubads().refresh([slot6]); 40 break; 41 case "slot7": 42 //console.log("Slot Unique ID:::", currentValue); 43 googletag.pubads().refresh([slot7]); 44 break; 45 case "slot8": 46 //console.log("Slot Unique ID:::", currentValue); 47 googletag.pubads().refresh([slot8]); 48 break; 49 case "slot9": 50 //console.log("Slot Unique ID:::", currentValue); 51 googletag.pubads().refresh([slot9]); 52 break; 53 case "slot10": 54 //console.log("Slot Unique ID:::", currentValue); 55 googletag.pubads().refresh([slot10]); 56 break; 57 case "slot11": 58 //console.log("Slot Unique ID:::", currentValue); 59 googletag.pubads().refresh([slot11]); 60 break; 61 case "slot12": 62 //console.log("Slot Unique ID:::", currentValue); 63 googletag.pubads().refresh([slot12]); 64 break; 65 } 66 }); 67 var date = new Date(); 68 var currentDateTime = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds(); 69 console.log(currentDateTime + ": Interval Google Tag Auto Refresh Called..."); 70 }); 71 }, auto_refresh_settings.timer); 72 console.log("set_interval_id: ", set_interval_id); 73 } 74 else{ 75 //console.log("status: False"); 76 } 77});
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.