mirror of
https://github.com/pacnpal/simpleguardhome.git
synced 2025-12-23 14:01:12 -05:00
docs(README.md): update error handling section and improve API endpoint descriptions
docs(userscript/README.md): enhance configuration instructions and clarify connection testing feat(userscript/simpleguardhome-404-checker.user.js): add connection testing and notification features for unblocking domains
This commit is contained in:
@@ -6,7 +6,8 @@ A Tampermonkey userscript that detects 404 responses while browsing and automati
|
||||
|
||||
- Automatically detects 404 responses from both fetch and XMLHttpRequest calls
|
||||
- Checks failed domains against your AdGuard Home instance
|
||||
- Shows notifications for blocked domains with unblock option
|
||||
- Shows notifications for blocked domains with one-click unblock button
|
||||
- Directly unblocks domains using SimpleGuardHome API
|
||||
- Configurable AdGuard Home instance settings
|
||||
- Caches results to minimize API calls
|
||||
- Error handling with configuration shortcuts
|
||||
@@ -20,14 +21,28 @@ A Tampermonkey userscript that detects 404 responses while browsing and automati
|
||||
|
||||
## Configuration
|
||||
|
||||
### Initial Setup
|
||||
1. Click on the Tampermonkey icon in your browser
|
||||
2. Select "Configure SimpleGuardHome Instance" under the script's menu
|
||||
3. Enter your AdGuard Home host (e.g., `http://localhost`)
|
||||
4. Enter your AdGuard Home port (default: 3000)
|
||||
2. Select "⚙️ Configure SimpleGuardHome" under the script's menu
|
||||
3. Review your current settings (if any)
|
||||
4. Enter new host and port settings
|
||||
5. Connection test will be performed automatically
|
||||
- Success: Settings are saved immediately
|
||||
- Failure: Option to save anyway or retry
|
||||
|
||||
### Menu Options
|
||||
- "⚙️ Configure SimpleGuardHome" - Open configuration dialog
|
||||
- "🔄 Test Connection" - Test current settings
|
||||
|
||||
### Default Settings
|
||||
- Host: `http://localhost`
|
||||
- Port: `3000`
|
||||
- Port: `8000` (SimpleGuardHome default port)
|
||||
|
||||
### Connection Testing
|
||||
- Automatic testing when saving new settings
|
||||
- Manual testing available through menu
|
||||
- Clear notifications of test results
|
||||
- Option to save settings even if test fails
|
||||
|
||||
## How It Works
|
||||
|
||||
@@ -35,8 +50,10 @@ A Tampermonkey userscript that detects 404 responses while browsing and automati
|
||||
2. When a 404 response is detected:
|
||||
- Extracts the domain from the failed URL
|
||||
- Checks if the domain is blocked by AdGuard Home
|
||||
- Shows a notification if the domain is blocked
|
||||
- Provides a quick "Unblock" button to open SimpleGuardHome
|
||||
- Shows a notification with status if domain is blocked
|
||||
- Provides a one-click "Unblock Domain" button
|
||||
- Directly unblocks domain when button is clicked
|
||||
- Shows success/error notification after unblock attempt
|
||||
|
||||
3. Error handling:
|
||||
- Connection issues show a notification with configuration options
|
||||
@@ -54,10 +71,11 @@ A Tampermonkey userscript that detects 404 responses while browsing and automati
|
||||
### Cache System
|
||||
- Domain check results are cached for 1 hour
|
||||
- Cache includes:
|
||||
- Block status
|
||||
- Blocking reason
|
||||
- Applied rules
|
||||
- Block status (true/false)
|
||||
- Timestamp
|
||||
- Cache is updated when:
|
||||
- Domain is checked (status: "not blocked", "blocked")
|
||||
- Domain is unblocked (status: "already unblocked", "has been unblocked")
|
||||
|
||||
### Error Handling
|
||||
- Connection failures
|
||||
|
||||
Reference in New Issue
Block a user