PageSourceSearch

https://www.newsport.com.au/fileadmin/templates/scripts/events-listing_1.08.min.js?1727399178

js newsport.com.au collected 2026-10-02 04:47:28 UTC 7,380 bytes, 41 lines download raw bytes

1function parseURL(t){"use strict";var s=document.createElement("a");return{source:s.href=t,protocol:s.protocol.replace(":",""),host:s.hostname,port:s.port,query:s.search,params:function(){for(var t,e={},i=s.search.replace(/^\?/,"").split("&"),n=i.length,a=0;a<n;a++)i[a]&&(e[(t=i[a].split("="))[0]]=t[1]);return e}(),file:(s.pathname.match(/\/([^\/?#]+)$/i)||[,""])[1],hash:s.hash.replace("#",""),path:s.pathname.replace(/^([^\/])/,"/$1"),relative:(s.href.match(/tps?:\/\/[^\/]+(.+)/)||[,""])[1],segments:s.pathname.replace(/^\//,"").split("/")}}let ListFilter=function(){"use strict";return{init:function(t){var e,i=t.elFilterSelectors,n=t.elTargetList,t=t.elTargetListItem;let a=$(i),s=$(n).find(t);function r(e){s.hide(),s.each(function(t){"all"!==e?-1<$(this).attr("data-categories").split(",").map(function(t){return t.trim()}).indexOf(e)&&$(this).show():"all"===e.toLowerCase()&&$(this).show()})}a.on("click",function(t){"radio"!==$(this).attr("type")&&t.preventDefault();var t=$(this).attr("data-cat-id"),e=$(this);a.each(function(){$(this).removeClass("active")}),e.addClass("active"),r(t)});let d=$("#proj-cat-filter--mobile");d.find(".option").on("click",function(){d.blur()}),(i=parseURL(window.location.href).params.catId)&&(r(i),e=i,$(".project-cats").find(".proj-cat-filter-selector").removeClass("active").each(function(){$(this).attr("data-cat-id")===e&&$(this).addClass("active")}),$("#proj-cat-filter--mobile").find("input.proj-cat-filter-selector").prop("checked",!1).each(function(){$(this).attr("data-cat-id")===e&&$(this).prop("checked",!0)}))}}}();const EventsListing=function(){"use strict";function y(t){return"number"==typeof t&&isFinite(t)&&Math.round(t)===t}function C(t,e,i,n,a){let s,r,d,l,o;e=y(e)?e:1,i=y(i)?i:e+1,t.find("tr").each(function(t){s=$.trim($(this).find("td:nth-child("+e+") "+n).text()),r=$.trim($(this).find("td:nth-child("+i+")").text()),s,r,d=function(t){t=t.split("-");let e=null;return e=t.length?(e=moment($.trim(t[0]),"LT","en-au")).format("HH:mm:ss"):e}(r),o=d?(l=s.split("T"))[0]+"T"+d+"+10:00":s,$(this).find(a).html(o)})}return{init:function(){$('body[data-page-id="21659"] .powermail_frontend').on("click",".item .btn-more-details",function(t){var e=$(this).attr("data-event-id");t.preventDefault(),$('body[data-page-id="21659"] .powermail_frontend').find(`.more-details[data-event-id='${e}']`).toggle(300,function(){}),"More details"===$(this).text()?$(this).text("Less details"):$(this).text("More details")})},formatEventListings:function(t){var e=$(t).find(".powermail_frontend > table"),i=e.find("tr:not(:nth-child(1))");let a,s,r,d,l,o,c,h,v,f,m,p,u=null,g,x,b,w,n="",L=[];if(0<e.length){e.find("tr:first-child").remove(),C(e,2,3,".iso8601date",".iso8601datetime");{e=$('body[data-page-id="21659"] .powermail_frontend table.table');var S=2;var D=".iso8601datetime";var T="asc";let i="asc"===T;T=e.find("tbody"),S=y(S)?S:1,T.find("tr").sort(function(t,e){return i?$("td:nth-child("+S+") "+D,t).text().localeCompare($("td:nth-child("+S+") "+D,e).text()):$("td:nth-child("+S+") "+D,e).text().localeCompare($("td:nth-child("+S+") "+D,t).text())}).appendTo(T)}i.each(function(t){a=$.trim($(this).find("td:nth-child(1) span").text()),s=$.trim($(this).find("td:nth-child(5)").text()),d=$.trim($(this).find("td:nth-child(2) .iso8601date").text()),r=$.trim($(this).find("td:nth-child(2)").find(".full-date").text()),l=$.trim($(this).find("td:nth-child(2)").find(".special-date-elements__month").text()),o=$.trim($(this).find("td:nth-child(2)").find(".special-date-elements__day").text()),c=$.trim($(this).find("td:nth-child(3)").text()),h=$.trim($(this).find("td:nth-child(4)").text()),f=$.trim($(this).find("td:nth-child(6)").text()),v=$.trim($(this).find("td:nth-child(7)").text()),m=$.trim($(this).find("td:nth-child(8)").text()),p=$.trim($(this).find("td:nth-child(9)").text()),u=p?`<a class="button-primary" href="${p=/^https?:\/\//i.test(p)?p:"https://"+p}" target="_blank" data-event-title="${s}">Website</a>`:null,g=$.trim($(this).find("td:nth-child(10)").text()),x=$.trim($(this).find("td:nth-child(11)").text()),w=$.trim($(this).find("td:nth-child(12)").text()),b=(n=x,e=32,!(window.innerWidth<390)||-1===(i=n.indexOf("@"))||(i=e-(e=n.slice(i)).length-3,n.length<=i)?n:n.slice(0,i)+"..."+e);var e,i,n={eventID:a,eventTitle:s,eventStartDateTimeISO8601:d,eventStartDateFull:r,eventStartDateShortMonth:l,eventStartDateDay:o,eventStartTime:c,eventEndTime:h,eventDescription:f,eventLocation:v,eventCost:m,eventLink:p,websiteLinkBtn:u,eventContactPhone:g,eventEmailOrganiser:x,eventEmailOrganiserShort:b,eventCategories:w};L.push(n),L}),L.sort(function(t,e){return new Date(t.eventStartDateTimeISO8601)-new Date(e.eventStartDateTimeISO8601)}),L,$.each(L,function(t,e){n+=`
2                    <div class="item" data-event-id="${t}" data-categories="${L[t].eventCategories}">
3						<div class="date">
4							<div class="date-inner">
5								<span class="month">${L[t].eventStartDateShortMonth}</span>
6								<span class="day">${L[t].eventStartDateDay}</span>
7							</div>
8						</div>
9						<div class="event-details">
10							<div class="core-details">
11								<div class="cd-left-col">
12									<h3 class="event-title">${L[t].eventTitle}</h3>
13									<div class="date"><strong>Date:</strong> ${L[t].eventStartDateFull}</div>
14									<div class="time"><strong>Time:</strong> ${L[t].eventStartTime} - ${L[t].eventEndTime}</div>
15									<div class="location"><strong>Location:</strong> ${L[t].eventLocation}</div>
16								</div>
17								<div class="cd-right-col">`,L[t].websiteLinkBtn&&(n+=L[t].websiteLinkBtn),n+=`
18									<a class="button-primary btn-more-details" href="#" data-event-id="${t}">More details</a>
19								</div>
20							</div>
21							<div class="more-details" data-event-id="${t}">
22								<div class="more-details-inner">
23									<div class="cd-left-col">
24										<div class="description">
25											<strong>Description:</strong> ${L[t].eventDescription}
26										</div>`,L[t].eventCost&&(n+=`<div class="cost">
27										    <strong>Cost:</strong> ${L[t].eventCost}
28										</div>`),L[t].eventContactPhone&&(n+=`<div class="contact">
29											<strong>Contact phone:</strong> ${L[t].eventContactPhone}
30										</div>`),n+=`
31                        <div class="email-organiser">
32                            <strong>Email organiser:</strong> <a
33                                href="mailto:${L[t].eventEmailOrganiser}">${L[t].eventEmailOrganiserShort}</a>
34                            </div>
35                        </div>
36                            <div class="cd-right-col"></div>
37                        </div>
38                        </div>
39                        </div>
40                        </div>  <!-- / .item -->
41                            `}),"#c305206"!==t&&"#c305318"!==t||(n="<h3>WHAT'S ON</h3>"+n+'<a href="https://www.newsport.com.au/whats-on/" class="button-primary-inverse">View all events</a>'),$(t).find(".powermail_frontend").html(n)}}}}();$(document).ready(function(){"use strict";let e=null,i=null;var n=["#c302278","#c305206","#c305318"];for(let t=0;t<n.length;t++)if((e=$(n[t])).length){i=n[t];break}e.length&&(EventsListing.init(),EventsListing.formatEventListings(i),ListFilter.init({elFilterSelectors:'body[data-page-id="21659"] .project-cats .proj-cat-filter-selector',elTargetList:'body[data-page-id="21659"] .powermail_frontend',elTargetListItem:".item"}))});

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.