1/*! 2 * Mayday v1.0.1 3 * Copyright 2014-2024 New Mexico State University (https://www.nmsu.edu/) 4 */ 5function formattedDateAndTime(dateString){return new Date(dateString).toLocaleString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric"})}function tweakSearchBox(){let maydayHeight=$(".mayday").height();$("nav.navbar.navbar-default.navbar-fixed-top").css({top:maydayHeight}),$('img[src="images/logo-small.png"]').css({top:maydayHeight});let logoAndNavTop=$("#logoAndNav").offset();$("#searchSlideDown").css("top",logoAndNavTop.top)}const script=document.currentScript;let feedCampus="";const argCampus=script.getAttribute("data-campus");argCampus&&(feedCampus=argCampus);let feedServer="https://mayday.nmsu.edu";const argServer=script.getAttribute("data-feed");argServer&&(feedServer=argServer);let feedUrl=`${feedServer}/feed/${feedCampus}`;$((function(){$.get(feedUrl,(function(data){if(!0===data.any)if(!0===data.any_tearaway){$("head").empty(),$("head").append(data.tearaway_html.head);$("body").empty(),$("body").append(data.tearaway_html.body)}else{var newHtml="<div class='mayday' data-cy='mayday'>";newHtml+="<div class='container-fluid'><div class='row col-12 my-1 p-0 align-items-center justify-end'><p class='h3 m-2 text-white-50'>Close</p><button type='button' class='close mayday-dismiss text-white font-size-4 font-weight-bolder' aria-label='Close' data-cy='mayday-dismiss'><span aria-hidden='true'>×</span></button></div></div>",$.each(data.campuses,(function(campus,alerts_for_campus){var firstAlert=alerts_for_campus[0],restOfAlerts=alerts_for_campus.slice(1),lowerCampus=firstAlert.campus;newHtml+=`<div class='mayday-campus container-fluid' data-cy='mayday-campus-${lowerCampus}'>`,restOfAlerts.length>0&&(newHtml+=`<input id='collapsible-${lowerCampus}' class='toggle' type='checkbox' data-cy="collapsible-${lowerCampus}">`),newHtml+="<div class='mayday-header row' data-cy='mayday-header'>",newHtml+=`<h3 class='mayday-campus-name col-md-10 col-xs-8' data-cy='mayday-cname'>${campus}:</h3>`,restOfAlerts.length>0&&["more","less"].forEach((function(word){newHtml+=`<div class='label-${word} col-md-2 col-xs-4 text-center text-uppercase' data-cy="label-${word}">`,newHtml+=`<label for='collapsible-${lowerCampus}' class='small' data-cy="collapsible-${lowerCampus}">Show ${word}</label>`,newHtml+="</div>"})),newHtml+="</div>",newHtml+="<div class='mayday-alerts row' data-cy='mayday-alerts'>",newHtml+="<div class='mayday-item col-12' data-cy='mayday-item'>",newHtml+=`<div class='mayday-headline' data-cy='mayday-headline'>${firstAlert.headline}</div>`,newHtml+=`<div class='mayday-content' data-cy='mayday-content'>${firstAlert.content}</div>`,newHtml+=`<div class='mayday-date' data-cy='mayday-date'>${formattedDateAndTime(firstAlert.start_date)}</div>`,newHtml+="</div>",restOfAlerts.length>0&&(newHtml+=`<div class='collapsible-content-${lowerCampus} col-12' data-cy="collapsible-content-${lowerCampus}">`,$.each(restOfAlerts,(function(index,value){newHtml+="<div class='mayday-item' data-cy='mayday-item'>",newHtml+=`<div class='mayday-headline' data-cy='mayday-headline'>${value.headline}</div>`,newHtml+=`<div class='mayday-content' data-cy='mayday-content'>${value.content}</div>`,newHtml+=`<div class='mayday-date' data-cy='mayday-date'>${formattedDateAndTime(value.start_date)}</div>`,newHtml+="</div>"})),newHtml+="</div>"),newHtml+="</div>",newHtml+="</div>"})),!0===data.any_show_special&&(newHtml+="<div class='mayday-special container-fluid' data-cy='mayday-special'><div class='col-12 text-cap'><a href=\"https://alerts.nmsu.edu\">Click Here to View Special Announcements</a></div></div>"),newHtml+="</div>",$("body").prepend(newHtml),tweakSearchBox(),$(".mayday-dismiss").off("
5click").on("click",(()=>{$(".mayday").css("display","none"),tweakSearchBox()})),$(".label-more, .label-less").off("click").on("click",(()=>{setTimeout((()=>{tweakSearchBox()}),300)}))}}))}));
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.