PageSourceSearch

https://www.gla.ac.uk/3t4/js/dist/gu-eventfilter.a5769cb1.js

js gla.ac.uk collected 2026-09-24 07:22:07 UTC 1,400 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkuniversity_of_glasgow=self.webpackChunkuniversity_of_glasgow||[]).push([[7426],{43987:function(e,t,i){i.r(t),i.d(t,{default:function(){return EventFilter}});class EventFilter{constructor(e){this.el=e,this.filtercategories=this.el.dataset.categories.split(",").map((e=>e.trim())),fetch("/feeds/eventscategories/?getcat=1").then((e=>e.json())).then((e=>{this.categories=e,this.insertCategoryFilter()}))}getCategoryById(e){const t=this.categories.filter((t=>{if(t.categoryid==e)return t}));return{id:e,name:t[0].name}}insertCategoryFilter(){let e=document.createElement("select");e.classList.add("category-filter"),e.addEventListener("change",(e=>{this.filterTilesByCategoryId(e.target.value)})),e.insertAdjacentHTML("afterbegin",'<option value="">All</option>'),this.filtercategories.forEach((t=>{e.insertAdjacentHTML("beforeend",`<option value="${t}">${this.getCategoryById(t).name}</option>`)})),this.el.insertAdjacentElement("beforebegin",e)}filterTilesByCategoryId(e){console.log(e);let t=[];t=""!==e?[...document.querySelectorAll(".tileContainer")].map((t=>({el:t,show:t.dataset.cat.split(",").includes(e)}))):[...document.querySelectorAll(".tileContainer")].map((e=>({el:e,show:!0}))),t.forEach((e=>{e.show?e.el.classList.remove("hide"):e.el.classList.add("hide")})),new window.parseTiles(".tileContainer")}}}}]);
2//# sourceMappingURL=gu-eventfilter.a5769cb1.js.map

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.