1var SpecialEventOn = false; 2 3function initaliseSpecialEvent() { 4 console.log("Special event: " + SpecialEventOn); 5 6 if (SpecialEventOn == false) { 7 return false; 8 } 9 ExecuteSpecialEventPoll(); 10 setInterval(ExecuteSpecialEventPoll, 30000); 11 12} 13 14 15function ExecuteSpecialEventPoll() { 16 ds_GetDatePack(); 17} 18 19 20function ds_GetDatePack() { 21 22 $.ajax({ 23 type: "POST", 24 url: "ws/DTAPI.asmx/GetDateTimePackage", 25 contentType: "application/json; charset=utf-8", 26 data: {}, 27 dataType: "json", 28 async: false, 29 success: function (msg) { 30 SpecialEventRefresh(msg); 31 }, 32 error: function (xhr) { 33 34 }, 35 statusCode: { 36 403: function (xhr) { 37 toastr.error("Not authorised.") 38 }, 39 404: function (xhr) { 40 toastr.error("User not found.") 41 } 42 } 43 }) 44 45 46} 47 48function SpecialEventRefresh(msg){ 49 50 $('li.specialevent').each(function () { 51 52 if (parseInt($(this).data("day")) < parseInt(msg.d.day)) { 53 $(this).addClass("eventitem-aired"); 54 } 55 else { 56 if (parseInt(msg.d.day) == parseInt($(this).data("day"))) { 57 58 if (parseInt(msg.d.hour) > parseInt($(this).data("hour"))) { 59 $(this).addClass("eventitem-aired").removeClass("eventitem-airing"); 60 } 61 62 if (parseInt(msg.d.hour) == parseInt($(this).data("hour"))) { 63 $(this).addClass("eventitem-airing"); 64 } 65 } 66 } 67 68 }); 69 70 71}
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.