// ==UserScript== // @name Game Store Enhancer (Launcher) // @namespace https://github.com/gbzret4d/game-store-enhancer // @version 3.0.2 // @description Detects and recommends the correct Game Store Enhancer script for the current store. // @author gbzret4d // @match https://www.humblebundle.com/* // @match https://www.fanatical.com/* // @match https://dailyindiegame.com/* // @match https://www.dailyindiegame.com/* // @match https://www.gog.com/* // @updateURL https://raw.githubusercontent.com/gbzret4d/game-store-enhancer/main/game_store_enhancer.user.js // @downloadURL https://raw.githubusercontent.com/gbzret4d/game-store-enhancer/main/game_store_enhancer.user.js // @grant GM_addStyle // @grant unsafeWindow // @run-at document-end // ==/UserScript== (function () { 'use strict'; // --- Configuration --- const REPO_BASE = 'https://raw.githubusercontent.com/gbzret4d/game-store-enhancer/main/'; const SITES = { 'humblebundle.com': { name: 'Humble Bundle', script: 'humble_game_store_enhancer.user.js', color: '#cc2929' }, 'fanatical.com': { name: 'Fanatical', script: 'fanatical_game_store_enhancer.user.js', color: '#da0027' }, 'gog.com': { name: 'GOG', script: 'gog_game_store_enhancer.user.js', color: '#6e4595' }, 'dailyindiegame.com': { name: 'DailyIndieGame', script: 'dailyindiegame_game_store_enhancer.user.js', color: '#2b2b2b' } }; // --- Identification --- function getCurrentSite() { const host = window.location.hostname; for (const domain in SITES) { if (host.includes(domain)) return SITES[domain]; } return null; } // --- UI --- function showBanner(site) { if (localStorage.getItem('gse_launcher_dismissed_' + site.script)) return; // Double check existence just before showing (in case it loaded VERY late) if (checkStatus()) return; const banner = document.createElement('div'); banner.style.cssText = ` position: fixed; bottom: 20px; right: 20px; width: 300px; background: #1b2838; color: #fff; border: 1px solid #66c0f4; border-radius: 4px; padding: 15px; font-family: sans-serif; font-size: 13px; z-index: 2147483647; box-shadow: 0 4px 12px rgba(0,0,0,0.5); display: flex; flex-direction: column; gap: 10px; `; banner.innerHTML = `