ScriptCat
Home
Community
Script List
Browser Extension
Login
/
Script Market
/
SGLV PTW Tab All
Overview
Code
Feedback
Ratings
Version List
S
SGLV PTW Tab All
Healer007
•
Created 10 days ago
•
Updated 10 days ago
SGLV PTW Tab All
Statistics
Total Installs
8
Last 24h
+
0
User Rating
-
Ad
Description
Versions
Ratings
0
Permissions
Loading…
// @require https://scriptcat.org/lib/8430/1.0.0/SGLV%20PTW%20Tab%20All.js?sha384-otRObFkN7J8hmGayBiR4KW6b2icDjXIHEvgvElo3s58O0B5rc+mXKtlbEYC+ivRl
Watch
1
Favorite
0
Statistics
Total Installs
8
Last 24h
+
0
User Rating
-
Library Details
This is a library used by userscripts, you can reference it directly in your scripts.
License
Not declared
No license declared — reuse with caution
公开
SGLV PTW · Tab: 全部游戏列表 (All Games)
迁移自主脚本 mountPlaytimeAllList(v2.20.0 :15850-16058,209 行)
迁移纪律:纯搬运不改逻辑。唯一改动 = 依赖改为经 ctx.host 注入。
依赖注入对照表:
state.ownedGames → ctx.host.getOwnedGames()
isGameOwnedByMe(g) → ctx.host.isGameOwnedByMe(g)
ptGetAcquiredMap() → ctx.host.getAcquiredMap()
buildListToolbar / hbarRow / emptyHtml / paginate / renderPagination
→ ctx.host.*
escHtml / T / isZh → ctx.host.*
getGameIconUrl → ctx.host.getGameIconUrl
applyGameAliases → ctx.host.applyGameAliases
sglvToast → ctx.host.showToast
视图态:原实现用闭包变量(page/query/sortKey/sortAsc/hideUnplayed/hideShared),
此处改为读写 ctx.view —— 换取跨 Tab 联动 + 刷新不丢。