4.9 KiB
4.9 KiB
Star Chart Search Enhancer
Chrome MV3 extension for the Xingtu creator market page.
Development
npm install
npm test
npm run build
Release Build
npm run build:release
npm run package:internal
npm run buildoutputs the development bundle todist/npm run build:releaseoutputs the internal distribution bundle todist-release/npm run package:internalcreatesrelease/star-chart-search-enhancer-internal.zip- The extension ID is fixed to
pkjopdibdnomhogjheclhnknmejccffg
Load The Extension
- Run
npm run build - Open
chrome://extensions - Enable developer mode
- Choose
Load unpacked - Select the
dist/directory
Current Scope
- Adds two after-search-rate columns to the Xingtu market list
- Adds a popup-based Logto auth entry
- Hydrates the current page immediately
- Provides plugin-owned filter, sort, and CSV export controls
- Gates the market tools until auth is available
- Triggers full-scan flow only when filter, sort, or export is used
Auth Configuration
The Logto integration is wired with placeholder values in src/shared/auth-config.ts.
Replace these before real sign-in testing:
logtoEndpointappIdapiResource- Any extra scopes beyond
openid,profile, andoffline_access
The popup dev panel is controlled by enableDevAuthPanel and is disabled by default.
Popup Behavior
- Load the unpacked extension from
dist/ - Click the extension icon
- Confirm the popup shows
登录 Logtowhen unauthenticated - After real Logto config is added, use the popup to sign in and sign out
Protected API Mock Test
- Set
enableDevAuthPaneltotrueinsrc/shared/auth-config.ts - Run
npm run mock:protected-api - Run
npm run build - Reload the unpacked extension from
dist/ - Open the popup and log in
- Click
测试受保护接口 - Confirm the popup shows JSON containing
"source": "mock-protected-api"and"message": "authorized"
Batch Submit Mock Test
- Run
npm run mock:protected-api - Run
npm run build - Reload the unpacked extension from
dist/ - Open
https://xingtu.cn/ad/creator/market - Choose an export range in the plugin toolbar
- Click
提交批次 - Enter a batch name in the browser prompt
- Confirm the toolbar shows
批次提交成功 - Confirm the mock batch response accepts the payload
Market Auth Gate
When the market page is opened without a valid auth state, the content script renders
请先登录插件 and does not boot the filter, sort, or export toolbar.
Manual Verification
- Load the unpacked extension from
dist/ - Open
https://xingtu.cn/ad/creator/market - Confirm the page shows the auth gate until login is available
- After authentication is wired, confirm the two new columns appear
- Confirm current-page rows move through loading and then render values or failure states
- Apply a threshold filter and confirm the list hides unmatched rows
- Apply a sort and confirm row order changes
- Export CSV and confirm the file includes plugin status and after-search-rate fields
提交的数据格式
{
"logtoUserId": "p7pdhhtde8kj",
"creatorName": "王少卿",
"resource": "https://talent-search.intelligrow.cn",
"batchName": "自动验证批次",
"createdAt": "<提交当时的 ISO 时间戳>",
"authors": [
{ "authorId": "7041184989643276324", "authorName": "旖旖小虎🐯" },
{ "authorId": "7021245050621263906", "authorName": "瑶一瑶小肉包" },
{ "authorId": "6629722292110753806", "authorName": "陈翔六点半" },
{ "authorId": "7065613279053217829", "authorName": "小花花的每一天" },
{ "authorId": "7254389871895117885", "authorName": "疯铲姐妹" },
{ "authorId": "7294473194298146854", "authorName": "奇奇de海洋" },
{ "authorId": "6834119701379940360", "authorName": "任志达" },
{ "authorId": "6870159718216630285", "authorName": "大师兄的表哥" },
{ "authorId": "6833914516833566727", "authorName": "旺仔是三七分" },
{ "authorId": "7401565089431552037", "authorName": "笑典动物园" },
{ "authorId": "7120107426002501639", "authorName": "嘻哈不拆" },
{ "authorId": "7015813716650393630", "authorName": "周星伦" },
{ "authorId": "6870170568893661197", "authorName": "周周的周" },
{ "authorId": "6839989503663276045", "authorName": "潇潇学姐" },
{ "authorId": "7023032374749298718", "authorName": "大自然奇观" },
{ "authorId": "6870164079617523719", "authorName": "王小怪" },
{ "authorId": "6969058840033624100", "authorName": "周三拾" },
{ "authorId": "6825383642127138829", "authorName": "罗臣臣" },
{ "authorId": "6684403430837977100", "authorName": "段炼丶Exercise" },
{ "authorId": "7319160797236559882", "authorName": "郑皓文" }
]
}
Internal distribution steps are documented in
docs/internal-extension-distribution.md.