(function (global) { var times = {}; //------------------------------------ function now() { return +(new Date()); } //------------------------------------ function recordTime(timeLabel) { try { times[timeLabel] = now(); } catch (err) { } } //------------------------------------ var timeInfo = { recordTime: recordTime } //------------------------------------ global.timeInfo = timeInfo; })(this); timeInfo.recordTime("JsExecStarted"); function logAspxEvent(property) { property.id = '4d2ae0e7-6b27-4057-8c09-328e898fb53a'; if(window.location && window.location.pathname) { property.page = window.location.pathname.split("/").pop(); } if(typeof jQuery === 'function') { property.jQueryVersion = jQuery().jquery; } window.navigator.sendBeacon('monitoring', JSON.stringify( { EventSource: 'AspxPageEvent', MonitoringProperties: property })); } (function() { var originalWarn = console.warn; console.warn = function(message) { originalWarn.apply(console, arguments); logAspxEvent({'action':'consoleWarn', 'message':message}); }; var originalError = console.error; console.error = function(message) { originalError.apply(console, arguments); logAspxEvent({'action':'consoleError', 'message':message}); }; var originalOnerror = window.onerror; window.onerror = function(message, source, lineno, colno, error) { var details = 'Unhandled Exception: Exception in script "' + source + '" at pos ' + lineno + ':' + colno + ' - ' + message; logAspxEvent({'action':'UnhandledException', 'message':message, 'stack': error && error.stack, 'Description': details}); if(typeof originalOnerror === 'function') { return originalOnerror(message, source, lineno, colno, error); } return false; }; })();