From c6c6122491bd58761f474124cfbf22dd7b51e885 Mon Sep 17 00:00:00 2001 From: V1perW0lf <11570429+V1perW0lf@users.noreply.github.com> Date: Wed, 28 Oct 2026 17:27:29 -0500 Subject: [PATCH 1/2] fix achievement grouping --- manifest.json | 7 +- scripts/community/achievements.js | 1999 ++++++++++++----------------- styles/achievements.css | 358 +++--- 3 files changed, 990 insertions(+), 1374 deletions(-) diff --git a/manifest.json b/manifest.json index c55b77a45..d6a5c9c3d 100644 --- a/manifest.json +++ b/manifest.json @@ -383,7 +383,9 @@ "matches": [ "https://steamcommunity.com/id/*/stats*", - "https://steamcommunity.com/profiles/*/stats*" + "https://steamcommunity.com/profiles/*/stats*", + "https://steamcommunity.com/id/*/achievements/*", + "https://steamcommunity.com/profiles/*/achievements/*" ], "js": [ @@ -414,7 +416,8 @@ { "matches": [ - "https://steamcommunity.com/stats/*/achievements*" + "https://steamcommunity.com/stats/*/achievements*", + "https://steamcommunity.com/achievements/*" ], "js": [ diff --git a/scripts/community/achievements.js b/scripts/community/achievements.js index afeca756f..a30a1902e 100644 --- a/scripts/community/achievements.js +++ b/scripts/community/achievements.js @@ -2,54 +2,49 @@ 'use strict'; /** - * @typedef {object} ApiGameAchievement - * @property {string} internal_name - The internal identifier for the achievement - * @property {string} localized_name - The display name of the achievement - * @property {string} localized_desc - The description of the achievement - * @property {string} icon - The filename for the achievement icon - * @property {string} icon_gray - The filename for the grayed-out achievement icon - * @property {boolean} hidden - Whether the achievement is hidden from players until unlocked - * @property {string} player_percent_unlocked - The percentage of players who have unlocked this achievement - * @property {number?} global_unlock - The parsed float value of player_percent_unlocked - */ - -/** - * @typedef {object} PlayerAchievement - * @property {string|null} unlock - * @property {string|null} unlockCompare - * @property {string|null} progressText - * @property {string|null} progressTextCompare - * @property {string|null} progressWidth - * @property {number} [unlockTimestamp] - */ - -/** - * @typedef {object} AchievementData + * Achievements page enhancement for Steam's NEW (React) achievements page. + * + * Why this differs from the old version: + * - The new page has no .achieveRow / #personalAchieve / #tabs / #application_config, + * and class names are hashed, so scraping DOM rows is not reliable. + * - The new list is virtualized (only visible rows exist in the DOM). + * - But the server-rendered HTML contains the full data (schema, user unlocks, + * global percentages, config) in