PageSourceSearch

https://www.forgeaheaddelivery.com/assets/templates/default/js/dlc.js?v=126

js forgeaheaddelivery.com collected 2026-10-02 01:29:40 UTC 22,572 bytes, 658 lines download raw bytes

1// order/cart throttle
2
3var lastCartUpdate = 0;
4var cartUpdateThrottle = 500; // minimum number of milliseconds in between cart updates
5
6function shouldUpdateCart() {
7	var now = Date.now()
8	if (now - lastCartUpdate > cartUpdateThrottle) {
9		lastCartUpdate = now
10		return true
11	}
12	return false
13}
14
15//1.1v Logic
16var generic_modal_content = '';
17generic_modal_content += '<div class="generic-modal-wrapper"><div class="generic-modal-body-img"></div><div class="generic-modal-body-content">' + localization.common_geoStrictMode_outOfArea + '</div></div>';
18
19$(document).ready(function() {
20
21	var pathname = window.location.pathname.toLowerCase(); //Current page path
22	var _cookie_logged_in = getCookie('logged_in');
23
24	// reload cart on page load; fix #BSD-27303
25	// ...but not on group_order page per #BSD-32931
26	if (!pathname.match(/\/+group_order\//))
27		reload_cart();
28
29	//sessionStorage.removeItem('checkout_gap');
30	$('body').on('click', '#add_order_gap_btn', function(event) {
31		event.preventDefault();
32		$.post("", {'add_order_gap': true}, function(data){
33			reload_cart();
34			if(pathname.indexOf('/order/checkout') > -1) {
35			   reloadPage();
36			} else {
37				remove_page_loader();
38			}
39		});
40	});
41
42	//Trigger generic Modal until have the necesary logic
43/*	$('#generic-modal').on('show.bs.modal', function() {
44		$('#generic-modal #generic-modal-body').html(generic_modal_content);
45	});
46
47	$('#generic-modal').modal('show');*/
48
49	//Logic for disable/enable button on checkout pages
50  if ( $('#new_address_div .field_error').length > 0 ) {
51    $('.confirm-address-wrapper button').attr('disabled', 'disabled');
52  	$("body").on('keyup, change', '.order_information--verify_address_form input.error, .order_information--verify_address_form select.error', function(event) {
53  		var valid = true;
54  		$(".order_information--verify_address_form input.error").each(function(index, el) {
55  			
56  			if($(this).val() == ""){
57  				$('.confirm-address-wrapper button').attr('disabled', 'disabled');
58  				valid = false;
59  			}
60  		});
61  		if (!valid) return;
62	    $('.confirm-address-wrapper button').removeAttr('disabled');
63
64  		event.preventDefault();
65  		/* Act on the event */
66  	});
67  }
68	
69	//Logic for update price on cart-icon
70	update_cart_total_order();
71
72	$('#menu-modal').on( 'hidden.bs.modal', function(url){
73		update_cart_total_order();
74	});
75
76	$('body').on('click', '.toggle_dropdown_option', function(event) {
77		event.preventDefault();
78		var option_selected = $(this).children().children('input').val();
79		$('#restaurant_heading_modal').val(option_selected).change();
80	});
81
82	function update_cart_total_order(){
83
84		var total_price = '';
85
86		if (!shouldUpdateCart()) return;
87		$.get(base_url + "order/cart", function(data){
88			total_price = $(data).find('#cart_total_order').html();
89			if ( total_price != undefined ) {
90				$('#bottom-nav-total-order').html(': ' + total_price);
91				$('.cart_content--checkout_btn .price').html(total_price);
92				$('#btn_place_order .price').text(total_price);
93			} else {
94				$('#bottom-nav-total-order').html('');
95				$('.cart_content--checkout_btn .price').html('');
96			}
97		});
98	}
99
100	//Logic to add label-checked class
101	$('.select_address_radio').on('change', function(event) {
102		var container = $(this).parents('.panel-body');
103		var checkboxes = container.find("input[type=radio]");
104		checkboxes.each( function( key, value ){
105			if ($(value).is(":checked") ) {
106				$(value).parent().addClass('label-checked primary_border_color');
107			} else {
108				$(value).parent().removeClass('label-checked primary_border_color');
109			}
110		});
111	});
112	
113	$('body').on('click', '.inline-btns button', function(){
114		var $btns = $(this).closest('.inline-btns').find('button').not($(this));
115		$btns.removeClass('btn-primary'); 
116		$(this).addClass('btn-primary');
117	});
118	
119	/*Select payment method buttons*/
120	
121	$("body").on('click', '.paymentmethod-btns .inline-btns .btn', function(event) {
122		$('#CHECKOUTMETHOD').val($(this).val()).change();
123	});
124    
125    $("body").on('click', '.ncd-btns .inline-btns .btn', function(event) {
126		$('#NCD').val($(this).val()).change();
127	});
128	
129	$('.select_credit_card').on('change', function(event) {
130		var container = $(this).parents('#checkout_credit_card');
131		var checkboxes = container.find("input[type=radio]");
132		checkboxes.each( function( key, value ){
133			if ($(value).is(":checked") ) {
134				$(value).parent().addClass('label-checked primary_border_color');
135			} else {
136				$(value).parent().removeClass('label-checked primary_border_color');
137			}
138		} );
139	});
140
141	//Change waiter tip value
142	$("#driver_tip_form").on('click', '.tipwaiter-btns .inline-btns .btn', function(event) {
143		$('#driver_tip_percent').val($(this).val()).change();
144		$('#driver_tip_currency').val($(this).val()).change();
145	});
146	
147	//Change waiter tip value
148	$("#restaurant_tip_form").on('click', '.tipwaiter-btns .inline-btns .btn', function(event) {
149		$('#restaurant_tip_percent').val($(this).val()).change();
150		$('#restaurant_tip_currency').val($(this).val()).change();
151	});
152
153	//Show cart summary when the title is clicked
154	$('body').on('click', '.checkout-summary-panel .panel-heading', function(event) {
155		var sign = $(this).find('i');
156		if(sign.hasClass('fa-plus')){
157			sign.removeClass('fa-plus');
158			sign.addClass('fa-minus');
159			$("#cart_panel_summary").slideDown('fast');
160			$('html, body').animate({ scrollTop: $("#cart_panel_summary").offset().top }, 500);
161		} else {
162			$("#cart_panel_summary").slideUp('fast');
163			sign.addClass('fa-plus');
164			sign.removeClass('fa-minus');
165		}
166	});
167
168	//Temporal logic for sort nav buttons
169	$('.nav-sort-btn').click(function(event) {
170		if($(this).hasClass('nav-sort-btn-selected')){
171			$(this).removeClass('nav-sort-btn-selected');
172			$(this).removeAttr("style");
173		} else {
174			wid = $(this)[0].getBoundingClientRect().width;
175			$(this).addClass('nav-sort-btn-selected');
176			$(this).css('max-width', wid+'px');
177		}
178	});
179
180	//Menu page logic
181	$('.order_restaurant--menu_item_container').click(function(event){
182		if(order_settings["restaurant_availability_status"] != "open"){
183			sessionStorage.setItem('lastItem',$(this).attr('id'));
184		}
185	});
186
187	if (sessionStorage.getItem("lastItem") != null && pathname.indexOf('/order/restaurant') > -1) {
188  		var last_item = sessionStorage.getItem("lastItem");
189  		$('#' + last_item).trigger('click');
190	}
191	sessionStorage.removeItem("lastItem");
192
193	//Side-bar tag logic
194
195	$('body').on('click', '.tags_container .filter_tag', function(){
196		//Trigerred when cliking an active filter tag
197		//Searches for the input with the same íd - the '-tag' sufix, and sets it to unchecked
198		var id = $(this).attr('id').replace('-tag','');
199		$('body').find('.checkbox input#' + id).prop('checked', false).change();
200		$(this).remove(); //The active filter tag is removed
201		if($('.tags_container .filter_tag').length != 0){ //Hide or show no active filters message
202			$('.tags_container .no_filters').css('display', 'none');
203		} else {
204			$('.tags_container .no_filters').css('display', 'block');
205		}
206	});
207
208 	$('body').on('click, change', '.restaurants_filters .checkbox input', function(){
209		//Triggered when clicking a cusine o preference item
210		//Creates a div object with the same id + the '-tag' sufix
211		var tag_id = $(this).attr('id') + '-tag';
212		if($(this).prop('checked') == true){
213			var tag_item = $(this).siblings('label').children('span').html();
214			$('.tags_container').append('<div id="' + tag_id + '" class="filter_tag btn-primary">' + tag_item + '<i class="fa fa-times"></i></div>')
215		} else {
216			$('.tags_container .filter_tag#' + tag_id).remove();
217		}
218		if($('.tags_container .filter_tag').length != 0){ //Hide or show no active filters message
219			$('.tags_container .no_filters').css('display', 'none');
220		} else {
221			$('.tags_container .no_filters').css('display', 'block');
222		}
223	});
224
225 	//If there are selected tags when the page loads, they are clicked
226 	//The selected_cuisines and selected_dietarys variables are defined on the template.tpl file
227	if(selected_cuisines != false && selected_cuisines != null){
228		$.each(selected_cuisines, function(index, value){
229			var id = decodeURIComponent('cuisine-' + value.replace(' ','').replace('/','')).replace('\'','');
230			id = id.replace(' ', '');
231			$('body').find('.checkbox input#' + id).prop('checked', true).change();
232		});
233	}
234	if(selected_dietarys != null){
235		$.each(selected_dietarys, function(index, value){
236			var id = decodeURIComponent('diet-' + value.replace(' ','').replace('/','')).replace('\'','');
237			id = id.replace(' ', '');
238			$('body').find('.checkbox input#' + id).prop('checked', true).change();
239		});
240	}
241
242 	//Filter sidebar submit
243	$('body').on('click', '.filter-submit button', function(){
244      	$('#filters-panel-form').submit();
245    });	
246
247 	//Dynamicaly set containers height
248	$('#filters-modal').on( 'shown.bs.modal', function(){
249		var modalHeight = $('#filters-modal').outerHeight() / 3;
250		var $containers = $("#filters-modal form .restaurants_filters:has(.checkbox)");
251
252		$containers.each(function(index, el) {
253			if($(this).outerHeight() >= modalHeight){
254				var label = $(this).find("> label").outerHeight(true);
255				var childHeight = 0;
256				var a = 0;
257				var currentHeight = 0;
258				$(this).children(".checkbox").each(function(index, el) {
259					if($(window).width() > 767){
260						if(index % 2 == 0 || index == 0){
261							a = $(this).outerHeight(true);
262							return true;
263						} else {
264							currentHeight = a >= $(this).outerHeight(true) ? a : $(this).outerHeight(true);
265						}
266					} else {
267						currentHeight = $(this).outerHeight(true);
268					}
269					if( (childHeight + currentHeight) <= (modalHeight - label) ){
270						childHeight += currentHeight;
271					}
272				});
273				$(this).height(label + childHeight);
274				$(this).data('heightAttr', label + childHeight + "px");
275				$(this).after('<span class="show-more text-primary"><i class="icon ion-plus-round" style="font-size: 10px;">&nbsp;</i> ' + localization.common_showMore + '</span>');
276				$(this).addClass('in');
277			};
278		});
279	});
280	//Logic for 'show more'/'show less' buttons on restaurant filters.
281	$("body").on('click', '#filters-panel-form .show-more', function(event) {
282		$(this).prev('.restaurants_filters').css('max-height','auto');
283		$(this).prev('.restaurants_filters').css('height', 'auto');
284		$(this).html('<i class="icon ion-minus-round" style="font-size: 10px;">&nbsp;</i> ' + localization.common_showLess);
285		$(this).removeClass('show-more').addClass('show-less');
286	});
287
288	$("body").on('click', '#filters-panel-form .show-less', function(event) {
289		$(this).prev('.restaurants_filters').css("max-height", $(this).prev('.restaurants_filters').data('heightAttr'));
290		$(this).html('<i class="icon ion-plus-round" style="font-size: 10px;">&nbsp;</i> ' + localization.common_showMore);
291		$(this).removeClass('show-less').addClass('show-more');
292	});
293
294	$('body #filters-modal').on( 'hide.bs.modal', function(){
295		if( $('#filters-panel-form .form-group > span').hasClass('show-less') ) {
296			$('#filters-panel-form .form-group > span').remove();
297		}
298	});
299
300	//Logic for bread crumb
301	if ( pathname.indexOf('/account') > -1 )  {
302      $('.second-menu').addClass('hidden');
303  	}
304
305	if (pathname.indexOf('/out-of-area') > -1 || pathname.indexOf('/faq') > -1 || pathname.indexOf('/refer-friend') > -1 )  {
306		$('.second-menu').addClass('hidden');
307	}
308	
309	if (pathname.indexOf('/order/index') > -1) {
310		$('.nav-search').addClass('active');
311		$('.nav-search > a').addClass('primary_border_color');
312	}
313
314	if (pathname.indexOf('/restaurants') > -1) {
315		$('.nav-restaurant').addClass('active passed');
316		$('.nav-restaurant > a').addClass('primary_border_color');
317	}
318
319	if (pathname.indexOf('/order/restaurant') > -1 && pathname.indexOf('/order/restaurants') < 0 ) {
320		$('.nav-order').addClass('active passed');
321		$('.nav-order > a').addClass('primary_border_color');
322	}
323	
324	if(restaurants_in_order) {
325		$('.nav-order').addClass('passed');
326		if(pathname.indexOf('/order/restaurants') > 0) {
327			$('.nav-order').removeClass('active');
328			$('.nav-order > a').removeClass('primary_border_color');
329		}
330	}
331  
332	if (pathname.indexOf('/order/checkout') > -1) {
333		$('.nav-checkout').addClass('active passed');
334		$('.nav-checkout > a').addClass('primary_border_color');
335		$('.nav-order').addClass('passed');
336	}
337	
338	if (pathname.indexOf('/login/checkout') > -1) {
339		$('.nav-checkout').addClass('active passed');
340		$('.nav-checkout > a').addClass('primary_border_color');
341		$('.nav-order').addClass('passed');
342	}
343	
344	if (pathname.indexOf('/order/information') > -1) {
345		$('.nav-checkout').addClass('active');
346		$('.nav-checkout > a').addClass('primary_border_color');
347		$('.nav-order').addClass('passed');
348		setTimeout(function(){
349			$(".label-checked.primary_border_color").parent().addClass("top_address");
350		}, 50);
351	}
352
353	// Logic to open and close deal-options on restaurants cards
354	$('body').on('click', '.restaurant-card-deal', function(event) {
355		event.preventDefault();
356		$(this).closest('.restaurant-card-wrapper').addClass('active');
357	});
358	$('body').on('click', '.deal-option-btn', function(event) {
359		event.stopPropagation();
360	});  	
361
362	$('body').on('click', '.close-deal-options, .restaurant-card-deal-wrapper', function(event) {
363		event.preventDefault();
364		$(this).closest('.restaurant-card-wrapper').removeClass('active');
365	});
366
367  if ($(window).width() > 767) {
368  	$('body').on('mouseover', '.restaurant-card-deal', function(event) {
369  		event.stopPropagation();
370  		$(this).closest('.restaurant-card-wrapper').addClass('active');
371  	});
372  	$('body').on('mouseover', '.cards-deal-options',function(event){
373  		event.stopPropagation();
374  	});
375  	$('body').on('mouseover', function(event){
376  		$('.restaurant-card-wrapper').removeClass('active');
377  	});
378  }
379    // Logic to open/close side bar menu
380	$('body').on('click', '.mobile-menu, .desktop-menu', function(event) {
381		if ( !$('.header-menu-mobile').hasClass('active') ){
382			$('.header-menu-mobile').addClass('active');
383			$('header').addClass('active');
384			$('body').addClass('block-scroll');
385			$('body').addClass('sidemenu-active');
386			$('.search-xs').hide();
387		} else {
388			$('.header-menu-mobile').removeClass('active');
389			$('body').removeClass('sidemenu-active');
390			$('body').removeClass('block-scroll');
391			$('header').removeClass('active');
392			$('.search-xs').show();
393		}
394	});
395	$('body').on('click','.menu-mobile-header, .off-menu-click', function(){
396		$('.mobile-menu').click();
397	});
398
399	//Slider from filters 
400	$("#example_slider").ionRangeSlider({
401		type: "single",
402		hide_min_max: true,
403		hide_from_to: true,
404		grid: true,
405		values: [45, 60, 90],
406		from: 60
407	});
408
409	//Sticky header on desktop and tablet
410	if ($(window).width() > 767) {
411		$('.header-menu-nav').sticky();
412		var heading_height = parseInt($("#display-time-hours .order_restaurant--open_hours .order_restaurant--open_hours_heading").outerHeight());
413		var open_hours_row_elements = $("#display-time-hours .order_restaurant--open_hours .open_hours_row");
414		var display_time_hours_height = parseInt($("#display-time-hours").outerHeight());
415		if(display_time_hours_height < $("#display-time-hours .order_restaurant--open_hours").outerHeight()){
416			$("#display-time-hours").next().removeClass('hidden');
417			var order_restaurant_hours_height = 0;
418			open_hours_row_elements.each(function(){
419				order_restaurant_hours_height += $(this).outerHeight();
420				if (order_restaurant_hours_height + heading_height < display_time_hours_height ){
421					$(this).removeClass('hidden');
422				}else{
423					$(this).addClass('hidden');
424				}
425			});
426			$("body").on('click', '#tab_menu_info span.show-more', function(event) {
427				$("#display-time-hours").css('max-height','1000px');
428				$(this).removeClass('show-more').addClass('show-less');
429				open_hours_row_elements.each(function(){
430					$(this).removeClass('hidden');
431				});
432			});
433			$("body").on('click', '#tab_menu_info span.show-less', function(event) {
434				$("#display-time-hours").css('max-height','176px');
435				$(this).addClass('show-more').removeClass('show-less');
436				var hide_elements_height = 0 ;
437				open_hours_row_elements.each(function(){
438					hide_elements_height += $(this).outerHeight();
439					if (hide_elements_height + heading_height > display_time_hours_height ){
440						$(this).addClass('hidden');
441					}
442				});
443			});
444		}
445	}
446  
447	$(window).resize(function() {
448		if ($(window).width() >= 768) {
449			if ($('.header-menu-nav').parent(".sticky-wrapper").length <= 0) {
450				$('.header-menu-nav').sticky();
451			}
452		} else {
453			$('.header-menu-nav').unstick();
454		}
455	});
456	$('body').on('click', '.modal_forgot', function(e) {
457			//$("#login-modal .modal-header h3").html("Welcome Back!");
458			$(".login-modal-content").slideUp();
459			$("#pass_reset_panel").removeClass('hidden');
460			$("#reset_password_panel").slideDown();
461			$("#reset_error, #unknown_email, pass_reset").addClass('hidden');
462			$("#login-modal .modal-header h3").html("Password Reset");
463			
464			$( "#back_to_login" ).click(function() {
465				$(".login-modal-content").slideDown();
466				$("#login-modal .modal-header h3").html("Login or Continue");
467				$("#reset_password_panel").slideUp();
468			});
469			
470			$( "#reset_password" ).click(function(e) {
471				e.preventDefault();
472				$("#reset_error").addClass('hidden');
473				$("#unknown_email").addClass('hidden');
474				$("#pass_reset").addClass('hidden');
475				$.ajax({
476					url: '/login/reset',
477					type: 'post',
478					data: $('#pass_rest_form').serialize(),
479					dataType: 'json',
480					async: false,
481					success: function(data) {
482						if(data.unknown_email) {
483							$("#unknown_email").removeClass('hidden');
484						}
485						if(data.reset_error) {
486							$("#reset_error p").html(data.reset_error);
487							$("#reset_error").removeClass('hidden');
488						}
489						if(data.password_reset) {
490							$("#pass_reset").removeClass('hidden');
491							$("#pass_reset_panel").addClass('hidden');
492						}
493					}
494				});
495			});
496				
497	});
498
499	//Logic for footer nav: search dark background
500	$('input.search_restaurant').focus(function(event){  //Add backdrop
501		if($(window).width() < 768){
502			$(this).siblings(".search-mobile-backdrop").addClass("active");
503		}
504	});
505
506	$('input.search_restaurant').focusout(function(event){ //Remove backdrop on losing focus on input
507		$(this).siblings(".search-mobile-backdrop").removeClass("active");
508	});
509
510	$(".search-mobile-backdrop").click(function(event){ //Remove backdrop on clicking on it 
511		$(this).removeClass("active");
512		$(this).siblings("input.search_restaurant").focusout();
513	});
514
515	//If no address, open time modal when clicking search input
516	$('.search_restaurant.no-search-bar, .sort_submit.no-search-button').click(function(event){
517		event.preventDefault();
518		$('#time-modal').modal('show');
519	});
520
521	//Logic for footer nav: menu headings selection modal
522	$('.restaurant_heading_select').click(function(event){ //Show modal
523		$('#menu-heading-modal').modal('show');
524	});
525
526	$('select[name="restaurant_heading"]').change(function(){ //Hide modal after selecting
527		$('#menu-heading-modal').modal('hide');
528	});
529
530	$(window).resize(function(){ //Hide modal if screen is wider than tablet width
531		if($(window).width() < 768 && $('#generic-modal').hasClass('in')){
532			$('#generic-modal').modal('hide');
533		}
534	});
535	
536	//Selects the initial searched address by default on the information page. If there is none, we select the first one.
537	//If user added a new addres and didn't fill out the required fields, the custom address is selected again
538	var user_address = jQuery.parseJSON(localStorage.getItem('cached_customer_address'));
539	if (user_address !== null) {
540		if($('#new_address_div').find('.field_error').length > 0){
541			$('input[name="set_address"]').click();
542		} else {
543			$('.radio').each(function(index, el) {
544				if($(this).find('small').text().indexOf(user_address.full_address) !== -1){
545					$(this).find('input').click();
546				}	
547			});
548			//if($('.radio input:checked').length === 0){
549				//$('.radio:first').find('input').click();
550			//}
551		}
552	}
553	
554	$('.clearable').each(function(index, el) {
555		$(this).after('<a class="clearlink fa fa-times-circle" href="javascript:" title="Click to clear"></a>');
556	});
557	
558	$('.clearlink').click(function() {
559		$(this).prev().val('').focus();
560	});
561});
562
563// Logic for show nav-info when scroll up
564// Logic for vanishing
565
566var lastScrollTop = 0, delta = 15;
567
568$(function(){
569	$(window).scroll(function(){
570    	hasScrolled()
571    	checkoutBtnsScrolled()
572   /* 	scrollOnBottom()*/
573	});
574	$('body').on({
575	  'touchmove': function(e) { 
576	  	hasScrolled()
577    }
578	});
579});
580function hasScrolled() {
581	if($(window).width() < 768){
582	    var st = $(this).scrollTop();
583	    // Make sure they scroll more than delta
584	    if(Math.abs(lastScrollTop - st) <= delta)
585	        return;
586
587	    //Scroll for the bottom bar
588	    if (st > lastScrollTop  && $(document).height() - 56 > st + $(window).height()){
589	        // Scroll Down
590	        $('.bottom-nav').removeClass('nav-down').addClass('nav-up');
591	    } else {
592	        // Scroll Up
593	        if(st + $(window).height() < $(document).height()) {
594	            $('.bottom-nav').removeClass('nav-up').addClass('nav-down');
595	        }
596	    }
597
598	    lastScrollTop = st;
599	}
600}
601
602function checkoutBtnsScrolled() {
603	if ( $('.bottom-nav').hasClass('nav-up') ) {
604		$('#btn_place_order').addClass('button-down');
605		$('.confirm-address-wrapper button').addClass('button-down');
606	} else {
607		$('#btn_place_order').removeClass('button-down');
608		$('.confirm-address-wrapper button').removeClass('button-down');
609	}
610}
611
612function outAreaModal(){
613	var modal_content = '<div class="generic-modal-wrapper"><div class="generic-modal-body-img"></div><div class="generic-modal-body-content">' + localization.common_geoStrictMode_outOfArea + '</div></div>';
614	$('#generic-modal #generic-modal-body').html(modal_content);
615	$('#generic-modal').modal('show');
616}
617
618function submitAddress(){
619		add_page_loader();
620		var address  = $('#search-form-inner input[name="address"]').val();
621		var zip_code = $('#search-form-inner input[name="zip_code"]').val();
622		var data     = {
623					'address'             : address,
624					'zip_code'            : zip_code,
625					'update_order_params' : true
626				};
627
628				$.ajax({
629				url: 'order',
630				type: 'post',
631				data: data,
632				dataType: 'json',
633				success: function(data) {
634					
635					if(data.set_address == null){
636						window.location.href = '/restaurants';
637					} else {
638						window.location.href = '/order/restaurants';
639					}
640
641				},
642			    error: function(xhr, textStatus, errorThrown){
643			    	remove_page_loader();
644			       	outAreaModal();
645			    },
646
647			});
648}
649
650function goBack() {
651	window.location = document.referrer;
652}
653
654function reloadPage() {
655	setTimeout(function(){
656		location.reload();
657	}, 50); 
658}

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.