1jQuery(document).ajaxSuccess(function () { 2 3 let replace_shop_href = jQuery('a[href*="shop/shop"]'); 4 if (replace_shop_href.length > 0) { 5 replace_shop_href.attr("href", replace_shop_href.prop('href').replace('shop/shop', 'shop/')); 6 } 7 8 localStorage.removeItem('set_user_journey'); 9 localStorage.removeItem('set_user_journey_values'); 10 11}); 12 13 14jQuery(document).ready(function () { 15 16 const URL = window.location.pathname; 17 const Event_URL = '/shop/'; 18 const Tickets = localStorage.getItem('Tickets'); 19 const Grillhuetten = localStorage.getItem('Grillhuetten'); 20 21 if (localStorage.getItem('Visit') === null) { 22 let matcher = URL.match(/([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))/); 23 if (matcher !== null) { 24 localStorage.setItem('Visit', matcher[0]); 25 // window.location.reload(); 26 } 27 } 28 else { 29 let check_tc_start_date = jQuery('input#tc_start_date'); 30 let lsgtv = ''; 31 jQuery(document).ajaxStop(function () { 32 lsgtv = localStorage.getItem("Visit"); 33 if (lsgtv !== null) { 34 let format_day = lsgtv.slice(-2); 35 let format_month = lsgtv.slice(-5).slice(0,2); 36 let format_year = lsgtv.slice(0,4); 37 lsgtv = format_day + '.' + format_month + '.' + format_year; 38 } 39 }); 40 if (check_tc_start_date.length > 0 && localStorage.getItem('Visit') !== null) { 41 42 jQuery(document).ajaxStop(function () { 43 let format_day = lsgtv.slice(0,2); 44 let format_month = lsgtv.slice(3).slice(0,2); 45 let format_year = lsgtv.slice(-4); 46 let format_date = format_day + '.' + format_month + '.' + format_year; 47 48 check_tc_start_date.val(format_day + '.' + format_month + '.' + format_year); 49 50 let tc_start_date = jQuery('#tc_start_date'); 51 jQuery(tc_start_date).attr('value', format_date); 52 jQuery(tc_start_date).attr('placeholder', format_date); 53 jQuery('#tc_end_date').attr('value', format_date); 54 55 // tc_start_date.on("change", function () { 56 let tc_event_date = jQuery('.tc-event-date span'); 57 if (tc_event_date.length > 0) { 58 tc_event_date = tc_event_date[0].innerText; 59 } 60 let tc_event_date_string = tc_event_date.slice(0,10); 61 62 if (tc_event_date_string !== format_date) { 63 jQuery(document).ajaxComplete(function () { 64 if (localStorage.getItem("click_event") !== "true") { 65 // jQuery('#filter_events').first().trigger("click"); 66 localStorage.setItem("click_event", "true"); 67 } 68 }); 69 } 70 71 let click_trigger = jQuery('.tc-single-event h4 a'); 72 if (click_trigger.length > 0) { 73 click_trigger.on("click", function() { 74 console.log(localStorage.getItem("Visit")); 75 localStorage.removeItem("visit_fallback"); 76 localStorage.removeItem("Visit"); 77 localStorage.setItem("Visit", format_year + '-' + format_month + '-' + format_day); 78 console.log(localStorage.getItem("Visit")); 79 }); 80 } 81 82 if (localStorage.getItem('forced') === null) { 83 // jQuery('#filter_events').first().trigger("click"); 84 check_tc_start_date = jQuery('#tc_start_date').val(); 85 localStorage.setItem('forced', 'true') 86 } 87 }); 88 } 89 } 90 91 let Visit = localStorage.getItem("Visit"); 92 93 jQuery(document).ajaxStop(function () { 94 let lsgtv = localStorage.getItem("Visit"); 95 if (lsgtv !== null) { 96 let format_day = lsgtv.slice(0,2); 97 let format_month = lsgtv.slice(3).slice(0,2); 98 let format_year = lsgtv.slice(-4); 99 let format_date = format_day + '.' + format_month + '.' + format_year; 100 let tc_event_date = jQuery('.tc-event-date span'); 101 if (tc_event_date.length > 0) { 102 tc_event_date = tc_event_date[0].innerText; 103 } 104 let tc_event_date_string = tc_event_date.slice(0,10); 105 if (tc_event_date_string !== format_date && localStorage.getItem('visit_fallback') !== 'true') { 106 // jQuery('button#filter_events').first().trigger("click"); 107 localStorage.setItem('visit_fallback', 'true'); 108 } 109 } 110 }); 111 112 let matcher = URL.match(/([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))/); 113 if (matcher !== null) { 114 localStorage.setItem('Visit', matcher[0]); 115 Visit = localStorage.getItem("Visit"); 116 // window.location.reload(); 117 } 118 119 if (Visit !== null) { 120 if (localStorage.getItem('set_user_journey') !== 'true') { 121 localStorage.setItem('set_user_journey', 'true'); 122 jQuery('#body').prepend( 123 '<div class="user_journey_wrapper"><div id="user_journey" class="pagewidth"></div></div>' 124 ); 125 } 126 127 if (localStorage.getItem('set_user_journey') === 'true' && localStorage.getItem('set_user_journey_values') !== 'true') { 128 localStorage.setItem('set_user_journey_values', 'true'); 129 130 let user_journey = jQuery('#user_journey'); 131 let format_day = Visit.slice(-2);
132 let format_month = Visit.slice(-5).slice(0,2); 133 switch (format_month) { 134 case '01': format_month = 'Jan'; break; 135 case '02': format_month = 'Feb'; break; 136 case '03': format_month = 'Mrz'; break; 137 case '04': format_month = 'Apr'; break; 138 case '05': format_month = 'Mai'; break; 139 case '06': format_month = 'Jun'; break; 140 case '07': format_month = 'Jul'; break; 141 case '08': format_month = 'Aug'; break; 142 case '09': format_month = 'Sep'; break; 143 case '10': format_month = 'Okt'; break; 144 case '11': format_month = 'Nov'; break; 145 case '12': format_month = 'Dez'; break; 146 } 147 // let format_year = Visit.slice(0,4); 148 let format_date = format_day + '<span class="format_month">' + format_month + '</span>'; 149 150 user_journey.append( 151 '<div class="user_journey pagewidth date ' + (Visit !== null ? 'woocommerce-message' : 'woocommerce-error') + '">' + 152 (Event_URL !== null ? '<a class="noforce" href="' + window.location.protocol + '//' + window.location.hostname + Event_URL + 'tickets/' + Visit + '">' : '') + 153 format_date + '' + Step_0.slice(0,6) + '<span class="small-label">' + Step_0.slice(5) + '</span>' + 154 (Event_URL !== null ? '</a>' : '') + 155 '<a class="mobile-link" href="'+ window.location.protocol + '//' + window.location.hostname + Event_URL + 'tickets/' + Visit + '" ></a></div>' 156 ); 157 user_journey.append( 158 (Event_URL !== null || Grillhuetten !== null || Tickets !== null ? '<div class="user_journey tickets pagewidth ticket ' + (Tickets !== null || Grillhuetten !== null ? 'woocommerce-message' : 'woocommerce-error') + '"><span class="link-content">' : '') + 159 Step_1 + 160 (Event_URL !== null || Grillhuetten !== null || Tickets !== null ? '</span><a class="mobile-link" href="'+ window.location.protocol + '//' + window.location.hostname + Event_URL + 'tickets/' + Visit + '" ></a></div>' : '') 161 ); 162 let ticket_journey = jQuery('.user_journey.tickets'); 163 ticket_journey.append( 164 '<div class="user_journey ' + (Tickets !== null ? 'woocommerce-message' : 'woocommerce-error') + '">' + 165 (Event_URL !== null || Grillhuetten !== null ? '<a class="force eintrittskarten" href="' + window.location.protocol + '//' + window.location.hostname + '/shop/tickets/' + Visit + '/eintrittskarten">' : '') + 166 Step_2 + 167 (Event_URL !== null || Grillhuetten !== null ? '</a>' : '') + 168 '</div>' 169 ); 170 ticket_journey.append( 171 '<div class="user_journey ' + (Grillhuetten !== null ? 'woocommerce-message' : 'woocommerce-error') + '">' + 172 (Event_URL !== null || Tickets !== null ? '<a class="force grillhuetten" href="' + window.location.protocol + '//' + window.location.hostname + '/shop/tickets/' + Visit + '/grillhuetten">' : '') + 173 Step_3 + 174 (Event_URL !== null || Tickets !== null ? '</a>' : '') + 175 '</div>' 176 ); 177 178 user_journey.append( 179 '<div class="user_journey pagewidth cart ' + ((Tickets !== null || Grillhuetten !== null) && window.location.pathname.indexOf('/shop/kasse') === 0 || window.location.pathname.indexOf('/shop/warenkorb') === 0 ? 'woocommerce-message' : 'woocommerce-error') + '" style="white-space:nowrap"><span class="link-content">' + 180 (Event_URL !== null && (Tickets !== null || Grillhuetten !== null) ? '<a href="' + window.location.protocol + '//' + window.location.hostname + '/shop/warenkorb">' : '') + 181 Step_4 + 182 (Event_URL !== null && (Tickets !== null || Grillhuetten !== null) ? '</a>' : '') + 183 '</span><a class="mobile-link" href="' + window.location.protocol + '//' + window.location.hostname + '/shop/warenkorb"></div>' 184 ); 185 user_journey.append( 186 '<div class="user_journey pagewidth bag ' + ((Tickets !== null || Grillhuetten !== null) && window.location.pathname.indexOf('/shop/kasse') === 0 ? 'woocommerce-message' : 'woocommerce-error') + '"><span class="link-content">' + Step_5 + '</span></div>' 187 ); 188 } 189 } 190 191 //force click events and create overlay for redirect pages 192 jQuery('a.force.eintrittskarten').on("click", function() { 193 localStorage.setItem("force", "eintrittskarten"); 194 }); 195 196 jQuery('a.force.grillhuetten').on("click", function() { 197 localStorage.setItem("force", "grillhuetten"); 198 }); 199 //remove forcing for event page 200 jQuery('a.noforce').on("click", function() { 201 localStorage.removeItem("force"); 202 }); 203 204 let start_date = jQuery('#tc_start_date'); 205 start_date.on("change", function() { 206 let value = jQuery('#tc_start_date').val(); 207 let end_date = jQuery('#tc_end_date'); 208 209 start_date.attr('value', value); 210 start_date.attr('placeholder', value); 211 end_date.attr('value', value); 212 end_date.attr('placeholder', value); 213 }); 214}); 215 216jQuery(document).ajaxSend(function () { 217 if (!jQuery(".btn_text").length > 0) { 218 jQuery('.tc-listing-loader').hide(); 219 } 220 221 jQuery('#filter_events').on("click touch", function () { 222 jQuery('.tc-listing-loader').show(); 223 }); 224}); 225 226jQuery('#filter_events').on("click touch", function () { 227 jQuery(document).ajaxStop(function () { 228 jQuery('body.home .tc-single-event').attr( "style", "display: flex !important;" ); 229 }); 230});
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.