1(function($){ 2 var log_id = 0; 3 4 $(document).ready(function() { 5 if ( 'undefined' !== typeof moove_frontend_activity_scripts && 'undefined' !== typeof moove_frontend_activity_scripts.log_enabled && 'undefined' !== typeof moove_frontend_activity_scripts.log_enabled.post_id ) { 6 $.post( 7 moove_frontend_activity_scripts.ajaxurl, 8 { 9 action: "moove_activity_track_pageview", 10 post_id: moove_frontend_activity_scripts.post_id, 11 is_single: moove_frontend_activity_scripts.is_single, 12 is_page: moove_frontend_activity_scripts.is_page, 13 user_id: moove_frontend_activity_scripts.current_user, 14 referrer: moove_frontend_activity_scripts.referrer, 15 extras: moove_frontend_activity_scripts.extras, 16 is_archive: moove_frontend_activity_scripts.is_archive, 17 is_front_page: moove_frontend_activity_scripts.is_front_page, 18 is_home: moove_frontend_activity_scripts.is_home, 19 archive_title: moove_frontend_activity_scripts.archive_title, 20 request_url: window.location.href, 21 }, 22 function( msg ) { 23 try { 24 var response = msg ? JSON.parse(msg) : false; 25 if ( typeof response === 'object' && response.id ) { 26 log_id = response.id; 27 try { 28 var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor); 29 if ( typeof moove_frontend_activity_scripts.extras !== 'undefined' ) { 30 var extras_obj = JSON.parse( moove_frontend_activity_scripts.extras ); 31 if ( typeof extras_obj.ts_status !== 'undefined' && extras_obj.ts_status === '1' ) { 32 window.addEventListener('beforeunload', function(event) { 33 if ( typeof log_id !== 'undefined' ) { 34 if ( 'function' === typeof navigator.sendBeacon ) { 35 var log_data = new FormData(); 36 log_data.append('action', 'moove_activity_track_unload'); 37 log_data.append('log_id', log_id); 38 navigator.sendBeacon( moove_frontend_activity_scripts.ajaxurl, log_data ); 39 } else { 40 $.post( 41 moove_frontend_activity_scripts.ajaxurl, 42 { 43 action: "moove_activity_track_unload", 44 log_id: log_id, 45 }, 46 function( msg ) { 47 console.warn(msg); 48 } 49 ); 50 } 51 } 52 }); 53 } 54 } 55 } catch(e) { 56 console.error(e); 57 } 58 } 59 } catch(e){ 60 console.error(e); 61 } 62 } 63 ); 64 } 65 }); 66 67})(jQuery); 68
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.