1/** 2 * @copyright Ueppy S.R.L. 3 */ 4/** CONFIG - INIZIO **/ 5var debug = true; 6var rel_root = '/'; 7var googleMapsLoaded = false; 8//var googleFonts = ['Nunito:300', 'Open Sans:600']; 9//var googleFonts = ['Montserrat:wght@300;400;500', 'Stint+Ultra+Expanded']; 10var googleFonts = ['Montserrat:300','Montserrat:400','Montserrat:500','Stint+Ultra+Expanded']; 11//<link 12// href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500&family=Stint+Ultra+Expanded&display=swap" 13// rel="stylesheet" 14// /> 15/** CONFIG - FINE **/ 16 17var main_host; 18var lang = 'it'; 19var cookieConsent = false; 20// Garantire load dopo ready con jquery >= 3 21var windowLoaded = false; 22window._iub = window._iub || []; 23$(window).on("load", function () { 24 windowLoaded = true; 25}); 26 27function afterLoad() { 28 if (typeof iubendaPolicyId != 'undefined' && typeof iubendaSiteId != 'undefined') { 29 30 _iub.csConfiguration = { 31 cookiePolicyId: iubendaPolicyId, 32 siteId: iubendaSiteId, 33 lang: lang, 34 callback: { 35 onConsentGiven: onCookieConsent 36 }, 37 banner: { 38 'content': html_entity_decode(Utility.getLang('base', 'INFO_COOKIE'), 'ENT_QUOTES', 'UTF-8'), 39 applyStyles: false 40 } 41 }; 42 43 var s = document.createElement("script"), tag = document.getElementsByTagName("script")[0]; 44 s.src = "//cdn.iubenda.com/cookie_solution/iubenda_cs.js"; 45 tag.parentNode.insertBefore(s, tag); 46 47 } 48} 49 50$(function () { 51 52 $(document).on('click', '.disabled', function (e) { 53 e.preventDefault(); 54 }); 55 56 $('.newwindow').bind('click', function (e) { 57 e.preventDefault(); 58 var href = $(this).attr('href'); 59 window.open(href, '', ''); 60 return false; 61 }); 62 63 main_host = location.protocol + '//' + location.host + rel_root; 64 65 lang = $('meta[http-equiv="Content-Language"]').attr('content'); 66 67 $.ajaxSetup({ 68 type: "POST", 69 error: function (x, e) { 70 Utility.unlockScreen(); 71 if (x.status == 404) { 72 Utility.alert({message: (Utility.getLang('base', 'WARNING'), 'Url non trovato')}); 73 } else if (x.status != 500) { 74 if (e == 'parsererror') { 75 Utility.alert({message: Utility.getLang('base', 'JSON_ERROR') + "\n" + x.responseText}); 76 } else { 77 if (e == 'timeout') { 78 Utility.alert({message: (Utility.getLang('base', 'WARNING'), 'Richiesta andata in timeout')}); 79 } else { 80 Utility.alert({message: (Utility.getLang('base', 'WARNING'), 'Errore sconosciuto')}); 81 } 82 } 83 } 84 } 85 }); 86 87 if (typeof(iubendaPolicyId) !== 'undefined') { 88 var privacyLink = '//www.iubenda.com/privacy-policy/' + iubendaPolicyId; 89 var privacyMarkup = '<a href="' + privacyLink + '" class="iubend
89a-nostyle no-brand iubenda-embed" title="Privacy Policy">Privacy Policy</a>'; 90 $(privacyMarkup).appendTo($('.privacyIubendaUPY')); //dare id all'alemento contenitore (contact - infohotel - newsletter) 91 92 var s = document.createElement("script"), tag = document.getElementsByTagName("script")[0]; 93 s.src = "//cdn.iubenda.com/iubenda.js"; 94 tag.parentNode.insertBefore(s, tag); 95 } else { 96 onCookieConsent(); 97 } 98 99 100 $('.shareWhatsappIcon').each(function () { 101 $(this).attr('href', $(this).attr('href') + $('title').text() + ' (' + encodeURI(location.href)) + ')'; 102 }); 103 104 //Commentare questa parte: Problema di convivenza tra iubenda e pulsanti social 105 $('.shareBtn').on('click', function (e) { 106 e.preventDefault(); 107 window.open($(this).attr('href'), 'social', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600'); 108 }); 109 110 if (!windowLoaded) { 111 $(window).on("load", afterLoad); 112 } else { 113 afterLoad(); 114 } 115 116}); 117 118 119function onCookieConsent() { 120 121 cookieConsent = true; 122 123 // Google Fonts 124 if (typeof(googleFonts) != 'undefined' && googleFonts.length) { 125 Utility.loadScript("//ajax.googleapis.com/ajax/libs/webfont/1.4.7/webfont.js?key=" + $('body').data('googlemapskey'), function () { 126 WebFont.load({ 127 google: { 128 families: googleFonts 129 } 130 }); 131 }); 132 } 133 134 // FACEBOOK 135 if ($('body').data('fbappid')) { 136 137 window.fbAsyncInit = function () { 138 FB.init({ 139 appId: $('body').data('fbappid'), 140 xfbml: true, 141 cookie: true, 142 version: 'v2.8' 143 }); 144 FB.AppEvents.logPageView(); 145 146 if (typeof(doFbStuff) == 'function') { 147 doFbStuff(); 148 } 149 150 }; 151 152 (function (d, s, id) { 153 var js, fjs = d.getElementsByTagName(s)[0]; 154 if (d.getElementById(id)) { 155 return; 156 } 157 js = d.createElement(s); 158 js.id = id; 159 js.src = "//connect.facebook.com/en_US/sdk.js"; 160 fjs.parentNode.insertBefore(js, fjs); 161 }(document, 'script', 'facebook-jssdk')); 162 163 $('.shareFBIcon').on('click', function (e) { 164 e.preventDefault(); 165 FB.ui({ 166 method: 'share', 167 href: encodeURI(location.href), 168 }, function (response) { 169 }); 170 }); 171 172 } else { 173 $('.shareFBIcon').on('click', function (e) { 174 e.preventDefault(); 175 Utility.alert({'message': 'Devi per forza creare un app facebook per utilizzare questa funzionalità e aggiungerla nal file main.js (<a href="https://developers.facebook.com/docs/javascript/quickstart">rif.</a>)'}); 176 }); 177 } 178 179 // GOOGLE MAPS 180 if ($('body').data('googlemapskey')) { 181 Utility.loadScript('https://www.google.com/jsapi', function () { 182 google.load("maps", "3", { 183 other_params: 'key=' + $('body').data('googlemapskey'), callback: function () { 184 googleMapsLoaded = true; 185 initMap(); 186 } 187 }); 188 }); 189 } 190 191 $('.shareFBIcon').on('click', function (e) { 192 e.preventDefault(); 193 window.open('http://www.facebook.com/sharer.php?u=' + encodeURI(location.href) + '&text=' + $('title').text() + '', 'facebook', 'width=500,height=400'); 194 }); 195 196 197 $('.shareTwitterIcon').on('click', function (e) { 198 e.preventDefault(); 199 var via = ''; 200 if ($('meta[property="twitter:site"]').length) { 201 via = '&via=' + $('meta[property="twitter:site"]').attr('content').replace('@', ''); 202 } 203 window.open('https://twitter.com/share?url=' + encodeURI(location.href) + via + '&text=' + $('title').text() + '', 'twitter', 'width=500,height=400'); 204 }); 205 206 $('.shareGplusIcon').on('click', function (e) { 207 e.preventDefault(); 208 window.open('https://plus.google.com/share?url=' + encodeURI(location.href), 'twitter', 'width=500,height=400'); 209 }); 210 211 $('.sharePint').on('click', function (e) { 212 e.preventDefault(); 213 var image = $("meta[property='og:image']").attr("content"); 214 var title = $("meta[property='og:title']").attr("content"); 215 window.open('https://www.pinterest.com/pin/create/button/?url=' + encodeURI(location.href) + '&media=' + image
215+ '&description=' + title + ' - www.lericettediirene.it'); 216 }); 217 218 if (recaptchaSiteKey) { 219 window.renderGoogleCaptcha = function () { 220 document.arrive('form', {existing: true}, function(form) { 221 var holder = form.querySelector('.upy-recaptcha-holder'); 222 if (null === holder){ 223 return; 224 } 225 var expCallback = function () { 226 grecaptcha.reset(holderId); 227 grecaptcha.execute(holderId); 228 } 229 var holderId = grecaptcha.render(holder,{ 230 'sitekey': recaptchaSiteKey, 231 'size': 'invisible', 232 'badge' : 'bottomright', // possible values: bottomright, bottomleft, inline 233 'expired-callback': expCallback, 234 'error-callback': expCallback, 235 }); 236 grecaptcha.execute(holderId); 237 // if ajax fails, we reset 238 $(document).ajaxStop(function() { 239 grecaptcha.reset(holderId); 240 grecaptcha.execute(holderId); 241 }); 242 }); 243 } 244 Utility.loadScript('https://www.google.com/recaptcha/api.js?onload=renderGoogleCaptcha&render=explicit'); 245 } 246}
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.