Skip to content

Commit 0971ef3

Browse files
committed
fix: tabs.onUpdated loading 不再清识别节流
SPA 页面 chrome 反复 fire loading→complete 序列,原本在 loading 时调 clearDetectionThrottle 把节流状态擦掉、下次 complete 进入 run 时 last=0、节流形同虚设。日志看到 4 次 run start 都跑了、没有任何 skipped 即为此。loading 时只清 timer 与暂存快照、保留节流标记,30 秒内 SPA 反复触发也只跑一次全量识别。loading 路径补 console 便于诊断。将版本号提升到 1.2.89。
1 parent e00917f commit 0971ef3

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "stackprism",
33
"private": true,
4-
"version": "1.2.88",
4+
"version": "1.2.89",
55
"type": "module",
66
"description": "StackPrism 用于检测网页前端、后端、CDN、SaaS、广告营销、统计、登录、支付、网站程序和主题模板线索。",
77
"scripts": {

src/background/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
6969
}
7070

7171
if (changeInfo.status === 'loading') {
72+
console.log('[SP detection] onUpdated loading', tabId, 'url', url)
7273
clearActiveDetectionTimer(tabId)
73-
clearDetectionThrottle(tabId)
7474
clearDynamicSnapshotTimer(tabId)
7575
clearPendingDynamicSnapshot(tabId)
7676
clearBadge(tabId)

0 commit comments

Comments
 (0)