From 6ad1ac7fd9e5a74380933aa3fffd3e4663055bfb Mon Sep 17 00:00:00 2001 From: Satella <41929633+Fonsicreus@users.noreply.github.com> Date: Sun, 1 Mar 2026 18:18:56 +0100 Subject: [PATCH] Support Steam game URLs in terminal (auto-convert to AppID) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit You can now paste Steam game URLs directly into any command that needs an AppID. Examples: - `owns ASF https://store.steampowered.com/app/730/` - `redeem https://steamdb.info/app/440/ 123456 https://store.steampowered.com/app/570/` ✅ Automatically converts to `owns ASF 730` ✅ Supports multiple URLs + mixed IDs/URLs ✅ Zero breaking changes (history, autocomplete, UI commands, etc.) Added `processSteamUrls()` function (only runs when the command is sent). --- src/views/Commands.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/views/Commands.vue b/src/views/Commands.vue index 45901f57d..ea6150571 100644 --- a/src/views/Commands.vue +++ b/src/views/Commands.vue @@ -249,12 +249,23 @@ this.$refs['terminal-input'].focus(); }, methods: { + // Converts Steam URLs into the game's numeric ID + processSteamUrls(command) { + if (typeof command !== 'string' || !command) return command; + + // Only game URLs (/app/). Includes steamdb.info. + const steamUrlRegex = /https?:\/\/(?:www\.)?(?:store\.steampowered\.com|steamcommunity\.com|steamdb\.info)\/app\/(\d+)(?:[\/?#][^\s]*)?/gi; + + return command.replace(steamUrlRegex, '$1'); + }, async sendCommand() { - const commandToExecute = this.command.trim(); + let commandToExecute = this.command.trim(); this.command = ''; if (!commandToExecute) return; + commandToExecute = this.processSteamUrls(commandToExecute); + this.commandHistoryIndex = -1; this.commandHistory.add(commandToExecute);