Skip to content

Commit 0a7eeb1

Browse files
committed
fix: 合并前端库别名重复
1 parent 053022c commit 0a7eeb1

3 files changed

Lines changed: 12 additions & 5 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.72",
4+
"version": "1.2.73",
55
"type": "module",
66
"description": "StackPrism 用于检测网页前端、后端、CDN、SaaS、广告营销、统计、登录、支付、网站程序和主题模板线索。",
77
"scripts": {

src/background/merge.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export const normalizeDynamicFallbackTechName = (name: unknown): string => {
4141
clipboardjs: 'clipboard',
4242
jquerycompat: 'jquery',
4343
imagesloadedjs: 'imagesloaded',
44+
layerjs: 'layer',
4445
slickcarousel: 'slick',
4546
twitterbootstrap: 'bootstrap',
4647
vuejs: 'vue'
@@ -53,9 +54,11 @@ export const isFrontendFallback = (item: any) => item?.category === '前端库'
5354
const frontendTechnologyCategories = new Set(['前端库', '前端框架', 'UI / CSS 框架'])
5455
const frontendFallbackEvidencePattern = /^/
5556

56-
const frontendAliasTechnologies: Record<string, { category: string; name: string }> = {
57+
const frontendAliasTechnologies: Record<string, { category: string; name: string; url?: string }> = {
5758
angular: { category: '前端框架', name: 'Angular' },
58-
jquerycompat: { category: '前端库', name: 'jQuery' },
59+
jquery: { category: '前端框架', name: 'jQuery' },
60+
jquerycompat: { category: '前端框架', name: 'jQuery' },
61+
layer: { category: '前端库', name: 'Layer.js', url: 'https://layer.layui.com' },
5962
preact: { category: '前端框架', name: 'Preact' },
6063
react: { category: '前端框架', name: 'React' },
6164
svelte: { category: '前端框架', name: 'Svelte' },
@@ -73,7 +76,8 @@ export const canonicalizeFrontendAliasTechnologies = (items: any[]) => {
7376
return {
7477
...item,
7578
category: canonical.category,
76-
name: canonical.name
79+
name: canonical.name,
80+
url: canonical.url || item.url
7781
}
7882
})
7983
}

src/injected/page-detector.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ const detectPageTechnologies = (ruleConfig: Record<string, unknown> = {}) => {
355355
clipboardjs: 'clipboard',
356356
jquerycompat: 'jquery',
357357
imagesloadedjs: 'imagesloaded',
358+
layerjs: 'layer',
358359
slickcarousel: 'slick',
359360
twitterbootstrap: 'bootstrap',
360361
vuejs: 'vue'
@@ -368,7 +369,9 @@ const detectPageTechnologies = (ruleConfig: Record<string, unknown> = {}) => {
368369
}
369370
const aliases = {
370371
angular: { category: '前端框架', name: 'Angular' },
371-
jquerycompat: { category: '前端库', name: 'jQuery' },
372+
jquery: { category: '前端框架', name: 'jQuery' },
373+
jquerycompat: { category: '前端框架', name: 'jQuery' },
374+
layer: { category: '前端库', name: 'Layer.js' },
372375
preact: { category: '前端框架', name: 'Preact' },
373376
react: { category: '前端框架', name: 'React' },
374377
svelte: { category: '前端框架', name: 'Svelte' },

0 commit comments

Comments
 (0)