PageSourceSearch

https://memorin.app/js/performance-analytics.js

js memorin.app collected 2026-10-02 01:14:52 UTC 2,666 bytes, 1 lines download raw bytes

1(function(n){"use strict";n.MemorinExperienceMetrics=function(r){if(n.__MEMORIN_EXPERIENCE_METRICS__||typeof r!="function")return;n.__MEMORIN_EXPERIENCE_METRICS__=!0;var _=performance.now(),i=document.hidden?0:_,E=0,u=0,f=0,M=0,o=null,d=0,v=0,m=0,l=0,h=new Map,T=!1,p=!1,s=performance.getEntriesByType("navigation")[0],P=s&&s.type||"navigate",g=!!n.matchMedia&&n.matchMedia("(pointer:coarse)").matches,C={LCP:[2500,4e3],INP:[200,500],CLS:[.1,.25],FCP:[1800,3e3],TTFB:[800,1800]};function y(e,t){var c=C[e];return t<=c[0]?"good":t<=c[1]?"needs_improvement":"poor"}function a(e,t){Number.isFinite(t)&&r("web_vital",{metric:e,value:e==="CLS"?Math.round(t*1e3)/1e3:Math.round(t),rating:y(e,t),navigation_type:P,mobile:g})}function w(e){i&&(E+=Math.max(0,e-i),i=0)}function L(){if(!T){T=!0,a("LCP",o&&o.startTime),a("CLS",v);var e=Array.from(h.values()).sort(function(t,c){return c-t});e.length&&a("INP",e[Math.floor(e.length/50)]||e[0])}}function S(){if(!p){p=!0;var e=performance.now();w(e),L(),r("session_engagement",{duration_seconds:Math.max(0,Math.round((e-_)/1e3)),active_seconds:Math.max(0,Math.round(E/1e3)),interaction_count:u,scroll_percent:f})}}document.addEventListener("visibilitychange",function(){document.hidden?(w(performance.now()),L()):!p&&!i&&(i=performance.now())},{passive:!0}),n.addEventListener("pagehide",S,{passive:!0,once:!0}),n.addEventListener("pointerdown",function(){u+=1},{passive:!0,capture:!0}),n.addEventListener("keydown",function(){u+=1},{passive:!0,capture:!0}),n.addEventListener("scroll",function(){var e=document.documentElement,t=Math.max(1,e.scrollHeight-n.innerHeight);f=Math.max(f,Math.min(100,Math.round(n.scrollY/t*100)))},{passive:!0}),n.addEventListener("error",function(){M++<3&&r("client_error",{error_code:"script_error"})},{passive:!0}),n.addEventListener("unhandledrejection",function(){M++<3&&r("client_error",{error_code:"unhandled_rejection"})},{passive:!0}),s&&a("TTFB",s.responseStart);var I=performance.getEntriesByName("first-contentful-paint")[0];I&&a("FCP",I.startTime);try{new PerformanceObserver(function(e){o=e.getEntries().slice(-1)[0]||o}).observe({type:"largest-contentful-paint",buffered:!0})}catch{}try{new PerformanceObserver(function(e){e.getEntries().forEach(function(t){t.hadRecentInput||((!m||t.startTime-l>1e3||t.startTime-m>5e3)&&(d=0,m=t.startTime),d+=t.value,l=t.startTime,v=Math.max(v,d))})}).observe({type:"layout-shift",buffered:!0})}catch{}try{new PerformanceObserver(function(e){e.getEntries().forEach(function(t){t.interactionId&&h.set(t.interactionId,Math.max(h.get(t.interactionId)||0,t.duration||0))})}).observe({type:"event",buffered:!0,durationThreshold:40})}catch{}}})(window);

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.