9d49a99916
Chrome extension for PokemonCenter monitoring with Discord notifications. Includes Python scripts for Target monitoring. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
69 lines
2.6 KiB
Markdown
69 lines
2.6 KiB
Markdown
# Pokemon Stock Monitor - Chrome Extension
|
|
|
|
A Chrome extension that monitors PokemonCenter for stock changes and sends Discord notifications.
|
|
|
|
## Why a Chrome Extension?
|
|
|
|
PokemonCenter uses Imperva bot protection that blocks automated browsers (Playwright, Selenium). This extension runs **inside your real Chrome browser**, making it undetectable - to the website, it looks exactly like you browsing manually.
|
|
|
|
## Installation
|
|
|
|
1. **Add Icons** (optional but recommended):
|
|
- Create or download three PNG icons: `icon16.png`, `icon48.png`, `icon128.png`
|
|
- Place them in this folder
|
|
- You can use any Pokemon-themed icons or simple colored squares
|
|
|
|
2. **Load the Extension**:
|
|
- Open Chrome and go to `chrome://extensions`
|
|
- Enable "Developer mode" (toggle in top right)
|
|
- Click "Load unpacked"
|
|
- Select this `chrome-extension` folder
|
|
- The extension icon should appear in your toolbar
|
|
|
|
3. **Configure**:
|
|
- Click the extension icon
|
|
- Paste your Discord webhook URL
|
|
- Add URLs to monitor (default is PokemonCenter TCG)
|
|
- Set check interval (1-60 minutes)
|
|
- Click "Save Settings"
|
|
|
|
## How It Works
|
|
|
|
1. **Background Service Worker**: Runs continuously in Chrome
|
|
2. **Periodic Checks**: Uses Chrome's alarm API to check at your interval
|
|
3. **Product Parsing**: Fetches pages and parses product data from HTML
|
|
4. **Change Detection**: Compares against known products to detect:
|
|
- New product listings
|
|
- Restocks (was out of stock, now in stock)
|
|
5. **Discord Notifications**: Sends rich embeds with product info and direct links
|
|
|
|
## Features
|
|
|
|
- **Keyword Filtering**: Only track products matching specific keywords
|
|
- **New Product Alerts**: Get notified when new items appear
|
|
- **Restock Alerts**: Get notified when out-of-stock items return
|
|
- **Browser Notifications**: Local notifications in addition to Discord
|
|
- **Persistent Storage**: Remembers products across browser restarts
|
|
|
|
## Tips
|
|
|
|
- **Keep Chrome Running**: The extension only works while Chrome is open
|
|
- **First Run**: After installing, click "Check Now" to do an initial scan
|
|
- **Clear History**: Use this if you want to re-detect all products as "new"
|
|
- **Multiple URLs**: Add one URL per line in the URLs field
|
|
|
|
## Troubleshooting
|
|
|
|
**No notifications sending:**
|
|
- Check that your Discord webhook URL is correct
|
|
- Make sure "Monitor Enabled" is toggled on
|
|
- Check Chrome's console for errors (right-click extension → Inspect popup)
|
|
|
|
**Extension not loading:**
|
|
- Make sure manifest.json is valid JSON
|
|
- Check for any icon files referenced but missing
|
|
|
|
**Products not detected:**
|
|
- PokemonCenter may have changed their HTML structure
|
|
- Check the browser console for parsing errors
|