您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Add download links for games on Steam pages
当前为
// ==UserScript== // @name DDSteam // @name:es DDSteam // @version 3.3 // @description Add download links for games on Steam pages // @description:es Añadir enlaces de descarga de juegos en las páginas de Steam // @author johnromerobot // @license MIT // @match https://store.steampowered.com/* // @namespace https://greasyfork.org/users/1243768 // ==/UserScript== (function() { 'use strict'; // Función para crear los botones function createButton(searchLink, buttonText, tooltipText, iconPath, targetElement, isWishlist = false) { const linkButton = document.createElement("a"); linkButton.href = searchLink; linkButton.setAttribute("target", "_blank"); linkButton.title = tooltipText; linkButton.style.display = 'inline-block'; linkButton.style.marginRight = '10px'; linkButton.style.marginBottom = '5px'; // Añadido margen inferior const img = new Image(); img.src = iconPath; img.alt = buttonText; img.style.width = isWishlist ? '48px' : '64px'; img.style.height = isWishlist ? '24px' : '32px'; img.style.objectFit = 'contain'; img.style.transition = 'transform 0.3s ease-in-out'; img.style.borderRadius = '8px'; img.style.boxShadow = '0 0 5px rgba(0, 0, 0, 0.3)'; img.style.backgroundColor = 'rgba(0, 0, 0, 0.2)'; linkButton.appendChild(img); return linkButton; // Retornamos el botón en lugar de insertarlo } // Función para formatear el nombre del juego function formatGameName(gameName) { return gameName.trim().toLowerCase().replace(/'/g, '').replace(/_/g, ' ').replace(/[^a-zA-Z0-9 ]/g, ''); } // Función para crear todos los botones para un juego function createAllButtons(gameName, targetElement, isWishlist = false) { const formattedGameName = formatGameName(gameName); // Crear contenedor para los botones const buttonContainer = document.createElement('div'); buttonContainer.style.display = 'flex'; buttonContainer.style.flexWrap = 'wrap'; buttonContainer.style.gap = '5px'; buttonContainer.style.marginTop = '10px'; // Espacio entre el título y los botones const sites = [ { name: "SteamGG", url: `https://steamgg.net/?s=${formattedGameName}`, tooltip: "Search on SteamGG", icon: "https://i.ibb.co/XCj45HD/1728102863385.png" }, { name: "SteamRIP", url: `https://steamrip.com/?s=${formattedGameName}`, tooltip: "Search on SteamRIP", icon: "https://i.imgur.com/tmvOT86.png" }, { name: "CompuPC", url: `https://compu-pc.com/?s=${formattedGameName}`, tooltip: "Search on CompuPC", icon: "https://img.compu-pc.com/i/a5bbf162b8926d1eff5cdbec5ee6e09a/logo.png" }, { name: "JuegosdePCFull", url: `https://juegosdepcfull.com/?s=${formattedGameName}`, tooltip: "Search on JuegosdePCFull", icon: "https://www.gamezfull.com/wp-content/themes/MystiqueR3/favicon_gf.ico" }, { name: "CS.RIN.RU", url: `https://cs.rin.ru/forum/search.php?keywords=${formattedGameName}&terms=all&author=&sc=1&sf=titleonly&sk=t&sd=d&sr=topics&st=0&ch=300&t=0&submit=Search`, tooltip: "Search on CS.RIN.RU (Login required)", icon: "https://i.ibb.co/RYQkz8t/site-logo-2.png" }, { name: "GOG", url: `https://www.gog-games.to/?q=${formattedGameName}`, tooltip: "Search on GOGGames", icon: "https://i.imgur.com/wXfz72C.png" }, { name: "FitGirl", url: `https://fitgirl-repacks.site/?s=${formattedGameName}`, tooltip: "Search on FitGirl", icon: "https://i.imgur.com/GOFbweI.png" }, { name: "PCGamingWiki", url: `https://www.pcgamingwiki.com/w/index.php?search=${formattedGameName}`, tooltip: "Search on PCGamingWiki", icon: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTwZgcgIYqscsLY6OnFI3sC7ZRYui2OghZWIg&s" } ]; sites.forEach(site => { const button = createButton(site.url, site.name, site.tooltip, site.icon, targetElement, isWishlist); buttonContainer.appendChild(button); }); targetElement.appendChild(buttonContainer); } // Función para agregar los botones en la página de detalles del juego function addButtonsToGamePage() { const gameNameElement = document.getElementById("appHubAppName"); if (gameNameElement) { createAllButtons(gameNameElement.textContent, gameNameElement, false); } } // Agregar estilos CSS const styles = ` a:hover img { transform: scale(1.1); } .wishlist_row .title { display: flex; flex-direction: column; } `; const styleSheet = document.createElement("style"); styleSheet.textContent = styles; document.head.appendChild(styleSheet); // Inicializar según la página if (window.location.href.includes('/app/')) { addButtonsToGamePage(); } })();