1var panes = 2; 2const picker_tbg = new Litepicker({ 3 element: document.querySelector("#tbg_booking input[name='departure_date']"), 4 singleMode: false, 5 numberOfColumns: panes, 6 numberOfMonths: panes, 7 minDate: new Date(), 8 tooltipText: { 9 one: 'night', 10 other: 'nights' 11 }, 12 tooltipNumber: (totalDays) => { 13 return totalDays - 1; 14 } 15}); 16 17function chk_size() { 18 if (window.innerWidth <= 700) { 19 picker_tbg.setOptions({ numberOfColumns: 1 }); 20 picker_tbg.setOptions({ numberOfMonths: 1 }); 21 } else { 22 picker_tbg.setOptions({ numberOfColumns: 2 }); 23 picker_tbg.setOptions({ numberOfMonths: 2 }); 24 } 25} 26 27window.onload = () => { chk_size() }; 28window.onresize = () => { chk_size() }; 29 30function validate(el, placeholder_msg) { 31 if (el.value == '' || el == null) { 32 el.parentElement.style.backgroundColor = '#FFE7E7'; 33 el.placeholder = placeholder_msg; 34 return false; 35 } 36 return true; 37} 38 39function tbg_book(e) { 40 e.preventDefault(); 41 42 var book = document.querySelector("#tbg_booking"); 43 44 let v = validate( 45 book.querySelector('input[name="departure_date"]'), 46 "Please Select your Dates" 47 ); 48 49 if (!v) { 50 return false; 51 } 52 53 var hotel = book.querySelector('select[name="destination"]'); 54 55 //https://book.travelbookgroup.com/premium/index.html?id_stile=15218&lingua_int=eng&id_albergo=19559&dc=2870 56 57 var dc = 2870; 58 var hotel_id = 19559; 59 var style = 15218; 60 var lang = "eng"; 61 62 lang = book.querySelector('input[name="lingua_int"]').value; 63 64 var adults = book.querySelector('select[name="occupancy_adults"]').value; 65 var children = book.querySelector('select[name="occupancy_children"]').value; 66 67 var promo_code = book.querySelector('input[name="promo_code"]').value; 68 69 let d = picker_tbg; 70 71 let dates = { 72 start_month: d.getDate().getMonth() + 1, 73 start_day: d.getDate().getDate(), 74 start_year: d.getDate().getFullYear(), 75 end_month: d.getEndDate().getMonth() + 1, 76 end_day: d.getEndDate().getDate(), 77 end_year: d.getEndDate().getFullYear(), 78 }; 79 80 var link = `tot_camere=1&tot_adulti=${adults}&tot_bambini=${children}&gg=${dates.start_day}&mm=${dates.start_month}&aa=${dates.start_year}&ggf=${dates.end_day}&mmf=${dates.end_month}&aaf=${dates.end_year}&id_stile=${style}&lingua_int=${lang}&generic_codice=${promo_code}`; 81 82 link = 83 book.action + "index2.html?" + link + `&id_albergo=${hotel_id}&dc=${dc}`; 84 85 window.open(link); 86}
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.