PageSourceSearch

https://www.hwunion.com/stylesheet/hw/hwunion.js?v=24

js hwunion.com collected 2026-10-02 08:09:12 UTC 6,351 bytes, 232 lines download raw bytes

1var d = new Date();
2var rn = new Date(d.getFullYear(),d.getMonth(),d.getDate(),d.getHours(),d.getMinutes());
3var fweek = new Date(2019,10,7,17,00);
4
5var options = { hour: 'numeric', minute: 'numeric', weekday: 'long', year: 'numeric', month: 'long', day: 'numeric', hour12: false };
6var weekday = new Array(7);
7weekday[0] =  "Sunday";
8weekday[1] = "Monday";
9weekday[2] = "Tuesday";
10weekday[3] = "Wednesday";
11weekday[4] = "Thursday";
12weekday[5] = "Friday";
13weekday[6] = "Saturday";
14var months = new Array(12);
15months[0] = "January";
16months[1] = "February";
17months[2] = "March";
18months[3] = "April";
19months[4] = "May";
20months[5] = "June";
21months[6] = "July";
22months[7] = "August";
23months[8] = "September";
24months[9] = "October";
25months[10] = "November";
26months[11] = "December";
27var timeline;
28var tTitle;
29var tDate;
30
31//tTitle = "Nominations close in";
32//tDate = fweek;
33
34
35var tDiff;
36var tDiffDesc;
37
38
39var DateDiff = {
40
41    inMins: function(d1, d2) {
42        var t2 = d2.getTime();
43        var t1 = d1.getTime();
44
45        return parseInt((t2-t1)/(60000));
46    },
47    
48    inHours: function(d1, d2) {
49        var t2 = d2.getTime();
50        var t1 = d1.getTime();
51
52        return parseInt((t2-t1)/(3600*1000));
53    },
54    
55    inDays: function(d1, d2) {
56        var t2 = d2.getTime();
57        var t1 = d1.getTime();
58
59        return parseInt((t2-t1)/(24*3600*1000));
60    },
61
62    inWeeks: function(d1, d2) {
63        var t2 = d2.getTime();
64        var t1 = d1.getTime();
65
66        return parseInt((t2-t1)/(24*3600*1000*7));
67    },
68
69    inMonths: function(d1, d2) {
70        var d1Y = d1.getFullYear();
71        var d2Y = d2.getFullYear();
72        var d1M = d1.getMonth();
73        var d2M = d2.getMonth();
74
75        return (d2M+12*d2Y)-(d1M+12*d1Y);
76    },
77
78    inYears: function(d1, d2) {
79        return d2.getFullYear()-d1.getFullYear();
80    }
81};
82
83//tDiff = DateDiff.inDays(rn,tDate);
84//tDiffDesc = "Days";
85//if (tDiff === 0) {
86    //tDiff = DateDiff.inHours(rn,tDate);
87    //tDiffDesc = "Hours";
88//}
89//tDiffH = DateDiff.inHours(rn,tDate);
90//tDiffDescH = "Hours";
91
92//tDiffM = DateDiff.inMins(rn,tDate);
93//tDiffDescM = "Minutes";
94
95function dateFormat(date) {
96    yy = date.getFullYear();
97    mm = months[date.getMonth()];
98    dd = date.getDate();
99    hh = date.getHours();
100    nn = leadZeros(date.getMinutes());
101    ww = weekday[date.getDay()];
102    //return hh + ":" + nn + ", " + ww + " " + dd + " " + mm + " " + yy;
103    return ww + ", " + dd + " " + mm + " " + yy;
104}
105
106function timeFormat(date) {
107    yy = date.getFullYear();
108    mm = months[date.getMonth()];
109    dd = date.getDate();
110    hh = date.getHours();
111    nn = leadZeros(date.getMinutes());
112    ww = weekday[date.getDay()];
113    if (hh > 12) {
114        hh = hh-12;
115        ampm = "pm";
116    } else {
117        hh = hh;
118        ampm = "am";
119    }
120    //return hh + ":" + nn + ", " + ww + " " + dd + " " + mm + " " + yy;
121    return hh + ":" + nn + "" + ampm;
122}
123
124function leadZeros(numb) {
125    //asString = numb.toString();
126    if (numb<10) {
127        return "0" + numb;
128    } else {
129        return numb;
130    }
131}
132
133$( document ).ready(function() {
134
135    if ( $( "#opening-hours" ).length ) {
136        //const dow = new Date();
137        var dowday = d.getDay();
138        switch (dowday) {
139            case 1:
140                dayname = "monday"
141                break;
142            case 2:
143                dayname = "tuesday"
144                break;
145            case 3:
146                dayname = "wednesday"
147                break;
148            case 4:
149                dayname = "thursday"
150                break;
151            case 5:
152                dayname = "friday"
153                break;
154            case 6:
155                dayname = "saturday"
156                break;
157            case 7:
158                dayname = "sunday"
159                break;
160        }
161        $("#opening-hours #" + dayname).attr("style", "font-weight: bold");
162    }
163
164    $('.countdown-title').html(tTitle);
165    $('.countdown-days .countdown-number').html(tDiff);
166    $('.countdown-days .countdown-desc').html(tDiffDesc);
167    if (tDiff === 0) {
168        $('.countdown-hours').addClass('active');
169        $('.countdown-days').remove();
170    }
171    $('.countdown-hours .countdown-number').html(tDiffH);
172    $('.countdown-hours .countdown-desc').html(tDiffDescH);
173    if (tDiffH === 0) {
174        $('.countdown-mins').addClass('active');
175        $('.countdown-hours').remove();
176    }
177    $('.countdown-mins .countdown-number').html(tDiffM);
178    $('.countdown-mins .countdown-desc').html(tDiffDescM);
179
180
181  $("#profile_content").addClass("row");
182  $("#profile_size").addClass("col-12");
183  $("#profile_size").addClass("col-md-4");
184  $("#profile_main").addClass("col-12");
185  $("#profile_main").addClass("col-md-8");
186  
187
188  
189  
190  var campus = getCookie("campus");
191
192if (campus != "") {
193  switch (campus) {
194    case "edinburgh":
195	  $("#flink1").html("<a class='no-underline' href='/freshers/'>More Info <span class='fas fa-chevron-right p-right'></span>");
196	  $("#flink2").html("<a class='no-underline' href='/freshers/bundles'>Ticket Bundles <span class='fas fa-chevron-right p-right'></span>");
197	  $(".edinburgh").each(function(){
198        $(this).removeClass("hide");
199        $(this).removeClass("disappear");
200      });
201      break;
202    case "sbc":
203      $("#flink1").html("<a class='no-underline' href='/freshers/'>More Info <span class='fas fa-chevron-right p-right'></span>");
204	  $("#flink2").html("<a class='no-underline' href='/freshers/wristband'>Freshers Wristband <span class='fas fa-chevron-right p-right'></span>");
205	  $(".sbc").each(function(){
206        $(this).removeClass("hide");
207        $(this).removeClass("disappear");
208      });
209      break;
210    default:
211      $(".edinburgh").each(function(){
212        $(this).removeClass("hide");
213        $(this).removeClass("disappear");
214      });
215      break;
216  }
217  $(".both").each(function(){
218      $(this).removeClass("hide");
219   });
220
221  $(".init").addClass("hide");
222
223  $("#show-campus").each(function(){
224    $(this).html(getCampus());
225  });
226} else {
227    $(".edinburgh").each(function(){
228        $(this).removeClass("hide");
229        $(this).removeClass("disappear");
230      });
231}
232});

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.