1(function($) { 2 "use strict"; 3 jQuery(document).ready(function($) { 4 $(document).on('click', '.twwr-whatsapp-button', function() { 5 var FBAction = $(this).attr('fb-pixel'); 6 if ( typeof fbq !== 'undefined' && FBAction ) { 7 if( FBAction != 'noevent' ){ 8 fbq('track', FBAction, {}); 9 } 10 } 11 }); 12 13 $(document).click(function(event) { 14 if($(event.target).closest('#contact-trigger').length) { 15 $('.twwr-container').toggleClass('open'); 16 } 17 }); 18 19 function twResponsive() { 20 $('.twwr-container.twwr-std .twwr-wa-button').each(function() { 21 var $this = $(this), 22 width = $this.outerWidth(); 23 24 if (width <= 200) { 25 $this.addClass('smallScreen'); 26 } else { 27 $this.removeClass('smallScreen'); 28 } 29 }) 30 } 31 32 $(window).on('load', function() { 33 twResponsive(); 34 }); 35 $(window).on('resize', function() { 36 twResponsive(); 37 }); 38 39 $(document).click(function(x) { 40 if($(x.target).closest('.close-chat').length) { 41 $('.twwr-container').removeClass('open'); 42 } 43 }); 44 45 function ForNumbers(evt){ 46 var charCode = (evt.which) ? evt.which : event.keyCode; 47 48 if ( 49 //0~9 50 charCode >= 48 && charCode <= 57 || 51 //number pad 0~9 52 charCode >
52= 96 && charCode <= 105 || 53 //backspace 54 charCode == 8 || 55 //tab 56 charCode == 9 || 57 //enter 58 charCode == 13 || 59 //left, right, delete.. 60 charCode >= 35 && charCode <= 46 61 ) 62 { 63 //make sure the new value below 20 64 if(parseInt(this.value+String.fromCharCode(charCode), 10) <= 100) 65 return true; 66 } 67 68 evt.preventDefault(); 69 evt.stopPropagation(); 70 71 return false; 72 } 73 74 $('input.input-views').each(function() { 75 var $this = $(this); 76 $this.on('keypress', ForNumbers, false); 77 78 console.log('anu mas') 79 }) 80 81 if( jQuery('.twwr-whatsapp-content').length > 0 || jQuery('.twwr-std').length > 0 ){ 82 var script = document.createElement('script'); 83 script.type = 'text/javascript'; 84 script.src = 'https://geolocation-db.com/json/geoip.php?jsonp=twwr_whatsapp_callback'; 85 var h = document.getElementsByTagName('script')[0]; 86 h.parentNode.insertBefore(script, h); 87 } 88 }); 89})(jQuery); 90 91function twwr_whatsapp_callback(data){ 92 "use strict"; 93 var geo = data; 94 95 var chats = []; 96 var agents = []; 97 var numbers = []; 98 if( jQuery('.twwr-whatsapp-button').length > 0 ){ 99 jQuery.each( jQuery('.twwr-whatsapp-button'), function(key, button){ 100 chats.push( jQuery(button).attr('data-chat') ); 101 agents.push( jQuery(button).attr('data-agent') ); 102 numbers.push( jQuery(button).attr('data-number') ); 103 }); 104 105 const rot_data = "action=twwr-whatsapp-chat-agent-count-click&chat="+chats+"&agent="+agents+"&number="+numbers+"&geo="+JSON.stringify(geo)+"&type=view&ref="+window.location.href; 106 107 jQuery.ajax({ 108 async: true, 109 url: twwr_whatsapp_chat.ajax_url, 110 type: 'POST', 111 data: rot_data, 112 }); 113 } 114 else if( jQuery('.twwr-wa-button').length > 0 ){ 115 jQuery.each( jQuery('.twwr-wa-button'), function(key, button){ 116 chats.push( jQuery(button).attr('data-chat') ); 117 agents.push( jQuery(button).attr('data-agent') ); 118 numbers.push( jQuery(button).attr('data-number') ); 119 }); 120 121 const rot_data = "action=twwr-whatsapp-chat-agent-count-click&chat="+chats+"&agent="+agents+"&number="+numbers+"&geo="+JSON.stringify(geo)+"&type=view&ref="+window.location.href; 122 123 jQuery.ajax({ 124 async: true, 125 url: twwr_whatsapp_chat.ajax_url, 126 type: 'POST', 127 data: rot_data, 128 }); 129 } 130}
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.