1(function() { 2 "use strict"; 3 4 var selectors = { 5 main:"#wrapper", 6 links : "*[href]", 7 ignoreLinks:"*[href^='#']" 8 }; 9 10 function sendData(href) { 11 var skull = Object.assign({},dataPage); 12 // tipo_request: [search_general | search_landing | visit_tourist_resources | visit_landing | 13 // visit_static_content | rate_ tourist_resources | add_to_planner | remove_from_planner | share] 14 // jQuery.getScript('/html/js/liferay/service.js', function(){ 15 skull.userID = themeDisplay.getUserId(); 16 skull.sessionID = themeDisplay.getSessionId(); 17 skull.language = themeDisplay.getLanguageId(); 18 skull.url_solicitada = href; 19 skull.timestamp = Date.now(); 20 skull.tipo_request = "visit"; 21 if(dataPage && !dataPage.is_default_user){ 22 Liferay.Service( 23 '/expandovalue/get-data', 24 { 25 companyId: themeDisplay.getCompanyId(), 26 className: 'com.liferay.portal.kernel.model.User', 27 tableName: 'CUSTOM_FIELDS', 28 columnNames: ['advancedContent','listType'], 29 classPK: themeDisplay.getUserId() 30 }, 31 function(obj) { 32 if(obj !== undefined){ 33 if(obj.advancedContent == 'true'){ 34 if(obj.listType != null){ 35 skull.tipo_viajero = obj.listType.split(";"); 36 } 37 postQuery(skull); 38 } 39 } 40 } 41 ); 42 } else { 43 postQuery(skull); 44 } 45 // }); 46 } 47 function postQuery(jsonData) { 48 var settings = { 49 "async" : true, 50 "crossDomain" : false, 51 "url" : window.location.origin + "/o/rest-kibana-logs/add", 52 "method" : "POST", 53 "headers" : { 54 "content-type" : "application/json", 55 "accept" : "application/json", 56 "cache-control" : "no-cache" 57 }, 58 "processData" : false, 59 "data" : JSON.stringify(jsonData) 60 }; 61 $.ajax(settings).done(function(response) {}); 62 } 63 $(window).ready(function() { 64 var userAcceptedCookies = false; 65 var cookies = document.cookie.split(";"); 66 for (var i = 0; i < cookies.length; i++) { 67 var c = cookies[i].trim(); 68 if (c.indexOf("ADVERTISING_COOKIE_CONSENT") == 0) { 69 userAcceptedCookies = c.substring("ADVERTISING_COOKIE_CONSENT".length + 1, c.length); 70 } 71 } 72 if(userAcceptedCookies == 'true'){ 73 $(selectors.main).off("mousedown"); 74 $(selectors.main).on("mousedown",function(e){ 75 var targets = $(e.target).parents(selectors.links).not(selectors.ignoreLinks); 76 if(targets.length>0){ 77 var href = targets.attr("href"); 78 sendData(href); 79 }else{ 80 var href = $(e.target).attr("href") 81 if( href != undefined && href.indexOf("#") != 0 && href.indexOf("javascript:;") != 0 ){ 82 sendData(href); 83 } 84 } 85 }.bind(this)); 86 } 87 }); 88})($)
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.