MCPcopy
hub / github.com/zxlie/FeHelper / sendWpoInfo

Function sendWpoInfo

apps/page-timing/content-script.js:266–285  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

264 const longTasksMonitor = observeLongTasks();
265
266 let sendWpoInfo = function () {
267 updateProgressTip('正在处理性能数据...', 60);
268 // 合并长任务数据
269 wpoInfo.longTasks = longTasksMonitor;
270
271 // 获取核心Web指标
272 getCoreWebVitals().then(webVitals => {
273 updateProgressTip('正在完成数据采集...', 80);
274 wpoInfo.webVitals = webVitals;
275
276 chrome.runtime.sendMessage({
277 type: 'fh-dynamic-any-thing',
278 thing: 'set-page-timing-data',
279 wpoInfo: wpoInfo
280 }, () => {
281 updateProgressTip('数据采集完成!', 100);
282 setTimeout(removeProgressTip, 1000);
283 });
284 });
285 };
286
287 let getHttpHeaders = function () {
288 if (wpoInfo.header && wpoInfo.time && wpoInfo.pageInfo) {

Callers 2

getHttpHeadersFunction · 0.85
detectFunction · 0.85

Calls 3

updateProgressTipFunction · 0.85
getCoreWebVitalsFunction · 0.85
setTimeoutFunction · 0.85

Tested by

no test coverage detected