1/** 2 * @copyright Ueppy S.R.L. 3 */ 4/** CONFIG - INIZIO **/ 5var debug = true; 6var rel_root = '/'; 7/** CONFIG - FINE **/ 8 9var main_host; 10var lang = 'it'; 11// Garantire load dopo ready con jquery >= 3 12var windowLoaded = false; 13$(window).on("load", function () { 14 windowLoaded = true; 15}); 16 17function afterLoad() { 18} 19 20$(function () { 21 22 $(document).on('click', '.disabled', function (e) { 23 e.preventDefault(); 24 }); 25 26 $('.newwindow').bind('click', function (e) { 27 e.preventDefault(); 28 var href = $(this).attr('href'); 29 window.open(href, '', ''); 30 return false; 31 }); 32 33 main_host = location.protocol + '//' + location.host + rel_root; 34 35 lang = $('meta[http-equiv="Content-Language"]').attr('content'); 36 37 $.ajaxSetup({ 38 type: "POST", 39 error: function (x, e) { 40 Utility.unlockScreen(); 41 if (x.status == 404) { 42 Utility.alert({message: (Utility.getLang('base', 'WARNING'), 'Url non trovato')}); 43 } else if (x.status != 500) { 44 if (e == 'parsererror') { 45 Utility.alert({message: Utility.getLang('base', 'JSON_ERROR') + "\n" + x.responseText}); 46 } else { 47 if (e == 'timeout') { 48 Utility.alert({message: (Utility.getLang('base', 'WARNING'), 'Richiesta andata in timeout')}); 49 } else { 50 Utility.alert({message: (Utility.getLang('base', 'WARNING'), 'Errore sconosciuto')}); 51 } 52 } 53 } 54 } 55 }); 56 57 $('.shareWhatsappIcon').each(function () { 58 $(this).attr('href', $(this).attr('href') + $('title').text() + ' (' + encodeURI(location.href)) + ')'; 59 }); 60 61 //Commentare questa parte: Problema di convivenza tra iubenda e pulsanti social 62 $('.shareBtn').on('click', function (e) { 63 e.preventDefault(); 64 window.open($(this).attr('href'), 'social', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600'); 65 }); 66 67 if (!windowLoaded) { 68 $(window).on("load", afterLoad); 69 } else { 70 afterLoad(); 71 } 72 73}); 74 75window._initialize = function (selector, callback) { 76 document.querySelectorAll(selector).forEach(function (el) { 77 callback.bind(el)(el); 78 }); 79 80 var mutationObserver = new MutationObserver(function (mutationList) { 81 mutationList.forEach(function (mutation) { 82 if (mutation.type === "childList") { 83 mutation.addedNodes.forEach(function (addedNode) { 84 if (! ('matches' in addedNode && 'querySelectorAll' in addedNode)) { 85 return; 86 } 87 if (addedNode.matches(selector)) { 88 callback.bind(addedNode)(addedNode); 89 } 90 addedNode.querySelectorAll(selector).forEach(function (el) { 91 callback.bind(el)(el); 92 }); 93 }); 94 } 95 }); 96 }); 97 mutationObserver.observe(document, {childList: true, subtree: true}); 98};
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.