A Firefox extension that enriches gog-games.to pages with media (screenshots and videos) from GOG Database.
Before: Standard gog-games.to page |
After: Enhanced with GOG Database media |
This extension enhances your browsing experience on gog-games.to by automatically adding:
- ๐ธ Screenshot Gallery: Displays all screenshots available on GOG Database
- ๐ฌ Video Gallery: Embeds trailers and promotional videos
- ๐จ Clean Interface: Design matching gog-games.to visual style
- โก Fast Loading: Optimized media loading with lazy loading
- ๐ฑ Responsive: Perfectly adapts to mobile and desktop screens
โ ๏ธ Error Handling: Clear messages when API fails or no media is found- ๐ Privacy-Focused: No data collection, no tracking, no analytics
The extension will soon be available on the official Firefox Add-ons store.
-
Download or clone this repository:
git clone https://github.com/all3f0r1/gog-games-extended-firefox.git
-
Open Firefox and navigate to
about:debugging#/runtime/this-firefox -
Click "Load Temporary Add-on..."
-
Select the
manifest.jsonfile in the extension folder -
The extension is now active! Visit a game page on gog-games.to to see the media.
-
Navigate to any game page on gog-games.to
- For example: https://gog-games.to/game/frostpunk_2
-
Wait for the page to load completely
-
Click the "More" button to reveal the links (GOGDB link must be visible)
-
A "๐ฎ GOG Database Media" section appears automatically with:
- Videos (trailers, gameplay, etc.)
- High-quality screenshots
-
Click on a screenshot to open it in full resolution in a new tab
-
Click on a video to play it directly on the page
The extension uses the following technologies:
- Manifest V3: Modern standard for Firefox extensions
- Background Script: Handles API requests to bypass CORS
- Content Script: Injects content into gog-games.to pages
- Message Passing: Communication between background and content scripts
- Host Permissions: Permissions to bypass CORS restrictions
- Content script detects the game page on gog-games.to
- A MutationObserver monitors dynamic content loading (SPA)
- Extracts the GOG Database link present on the page
- Retrieves the Product ID from the GOGDB URL
- Content script sends a message to the background script with the Product ID
- The background script performs the request to the GOGDB JSON API (CORS bypass)
- Background script returns the data to the content script
- Parses the data (screenshots, videos)
- Builds and injects an HTML/CSS gallery into the page
- Optimized image loading (thumbnails then full resolution)
Content scripts run in the page context and are subject to CORS restrictions, even with permissions declared in the manifest. Only background scripts can make cross-origin requests using host_permissions.
The extension requests the following permissions:
*://gog-games.to/*: To inject content on game pageshttps://www.gogdb.org/*: To retrieve data from the GOGDB APIhttps://images.gog-statics.com/*: To load images hosted by GOG
These permissions allow the background script to bypass CORS restrictions.
gog-games-extended-firefox/
โโโ manifest.json # Extension configuration
โโโ icons/ # Extension icons
โ โโโ icon-48.png # 48x48 icon
โ โโโ icon-96.png # 96x96 icon
โโโ src/ # Source code
โ โโโ background.js # Background script (API handling)
โ โโโ content-script.js # Content script (UI injection)
โ โโโ styles.css # Styles for galleries
โโโ screenshots/ # Before/After screenshots
โ โโโ before.png # Before extension
โ โโโ after.png # After extension
โโโ submission/ # AMO submission package
โ โโโ gog-games-extended-1.3.1.zip
โ โโโ AMO_LISTING.md
โ โโโ PRIVACY_POLICY.md
โ โโโ SUBMISSION_GUIDE.md
โโโ CHANGELOG.md # Version history
โโโ PRIVACY_POLICY.md # Privacy policy
โโโ LICENSE # MIT License
โโโ README.md # Documentation
- Firefox Developer Edition (recommended) or Firefox stable
- Code editor (VS Code, Sublime Text, etc.)
To modify the extension:
- Edit files in the
src/folder - Reload the extension in
about:debugging - Refresh the gog-games.to page to see changes
- Open the browser console (F12) on a gog-games.to page
- Content script logs are prefixed with
[GOG Games Extended] - To see background script logs, go to
about:debugging> "Inspect" the extension - Inspect injected elements with the DOM inspector
To create a distribution package:
cd /path/to/gog-games-extended-firefox
zip -r dist/gog-games-extended-1.3.1.zip manifest.json icons/ src/Contributions are welcome! To contribute:
- Fork the project
- Create a branch for your feature (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
See CHANGELOG.md for complete version history.
๐ Critical Bug Fix
- Extension now works when navigating from homepage to game page
- Content script injected on all gog-games.to pages (not just /game/*)
- Improved URL change detection with better state reset
- Added popstate event listener for browser back/forward navigation
This extension does not collect, store, or transmit any personal data. It only fetches publicly available game information from GOG Database to enhance your browsing experience.
See PRIVACY_POLICY.md for details.
Ready to submit to Firefox Add-ons? Check the submission/ folder for:
- Extension package (ZIP)
- Screenshots
- Listing information
- Privacy policy
- Step-by-step submission guide
See submission/SUBMISSION_GUIDE.md for detailed instructions.
This extension is an independent project and is not affiliated with GOG, CD Projekt, or gog-games.to. It uses publicly accessible data from GOG Database to enhance the user experience.
This project is licensed under the MIT License. See the LICENSE file for details.
- GOG Database for the API and data
- gog-games.to for the platform
- The Firefox community for extension development tools
For questions, suggestions, or bug reports, please open an issue on GitHub: https://github.com/all3f0r1/gog-games-extended-firefox/issues
Developed with โค๏ธ by Manus AI

