Tampermonkey Video Filter v5.1 (Hybrid Enhanced)

Advanced video filtering combining v4's proven core with v5's modern UI - supports all page types including popular posts

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Author
Chad Jordan
Daily installs
14
Total installs
476
Ratings
0 0 0
Version
5.1.0
Created
2026-01-15
Updated
2026-01-15
Size
50.5 KB
License
MIT
Applies to

🎯 Video Filter v5.1 Hybrid - Complete Guide
What is the Hybrid Version?
The v5.1 Hybrid combines the best of both worlds:

✅ v4's proven core logic - Working API integration, efficient duration checking, SPA navigation
✅ v5's modern UI - Beautiful interface, tabs, history, statistics, import/export
🌟 Key Features
From v4 (Core Functionality)
✅ DurationCheckerPool Class
Efficient queue-based duration checking
Prevents browser overload
Real-time status updates showing active/queued checks
Proper resource cleanup
✅ Comprehensive API Support
User profiles
User search results
Global search
Popular posts (CRITICAL - missing in original v5!)
✅ Lazy Loading Videos
IntersectionObserver for efficient video loading
Only loads videos when they come into view
Saves bandwidth and improves performance
✅ Real-time Card Rendering
Posts appear as they're processed
No waiting for all posts to finish
Better user experience
✅ SPA Navigation Handling
Properly handles history.pushState/replaceState
Resets state on URL changes
Works seamlessly with single-page app navigation
From v5 (Enhanced UI/UX)
✅ Modern Design
Beautiful gradient backgrounds
Smooth animations
Professional color scheme
Backdrop blur effects
✅ Tab System
Filter tab - Main filtering controls
Settings tab - Performance tuning
History tab - Recent filters with restore
✅ Statistics Display
Videos found counter
Posts processed counter
Real-time updates during filtering
✅ History System
Saves last 10 filter operations
One-click restore of previous filters
Timestamps for each filter
✅ Import/Export
Export settings as JSON
Import settings from file
Share configurations easily
✅ Enhanced Status Messages
Color-coded (info, success, error, warning)
Auto-dismiss for success messages
Clear, informative feedback
📦 Installation
Quick Install
Install Tampermonkey extension
Create new script in Tampermonkey
Copy code from hybrid_userscript.js
Save and enable
Navigate to any Kemono/Coomer page
🚀 Usage Guide
Supported Page Types
1. User Profile Pages
https://kemono.su/patreon/user/12345
https://coomer.party/onlyfans/user/username
What it does: Filters videos from a specific user's posts

2. User Search Results
https://kemono.su/patreon/user/12345?q=search+term
What it does: Filters videos from search results within a user's posts

3. Global Search
https://kemono.su/posts?q=search+term
What it does: Filters videos from global search results

4. Popular Posts ⭐ NEW!
https://kemono.su/posts/popular
https://kemono.su/posts/popular?period=week
https://kemono.su/posts/popular?date=2024-01-01&period=day
What it does: Filters videos from popular posts (trending content)

🎯 Basic Usage
Step 1: Navigate to Supported Page
Go to any of the supported page types listed above.

Step 2: Configure Filter
The panel appears in the bottom-right corner:

Pages: Enter page numbers

Single: 1
Multiple: 1,2,3
Range: 1-5
Mixed: 1,3-5,7
Duration: Filter by video length (optional)

10-30 = 10 to 30 seconds
60- = 60 seconds or longer
-120 = up to 2 minutes
Leave empty = no duration filter
Sort: Choose ordering

Date (Newest/Oldest)
Duration (Longest/Shortest)
Step 3: Filter
Click "🔍 Filter Videos" and wait for processing.

Step 4: Export
📋 Copy URLs: Copy all video URLs to clipboard
Or download the list as a text file
🔧 Advanced Features
Settings Tab
Performance Tuning
Max Concurrent Requests: 1-100 (default: 25)

Higher = Faster but more resource intensive
Lower = Slower but more stable
Adjust based on your system performance
Data Management
Export Settings: Save your configuration as JSON
Import Settings: Load saved configuration
Reset All: Clear all saved data and reload
History Tab
Recent Filters
View last 10 filter operations
See timestamp, pages, duration, and results
One-click restore of any previous filter
Clear History
Remove all saved filter history
Confirmation required
💡 How It Works
Duration Checking Process
Queue System

Video URLs → DurationCheckerPool → Queue
Concurrent Processing

Queue → Process (max 25 concurrent) → Results
Status Updates

"Checking duration (5/25, Q:10): video.mp4..."
API Integration
Context Detection

determinePageContext() → { type, service, userId, query, etc. }
URL Construction

buildApiUrl(context, offset) → API endpoint
Data Fetching

fetchData(apiUrl) → Posts array
Post Processing
Extract Videos

getAllVideoUrlsFromPost(post) → [video URLs]
Check Durations (if needed)

durationCheckerPool.add(url) → Promise
Filter & Render

if (matchesCriteria) {
createPostCardHtml() → Insert into DOM
}
Sort Results

sortCards(by: date|duration) → Reorder DOM
🎨 UI Features
Collapsible Panel
Click ⚙️ button to collapse/expand
Saves state between sessions
Minimal footprint when collapsed
Tab Navigation
Filter: Main controls
Settings: Configuration
History: Past filters
Visual Feedback
🔵 Blue = Info
✅ Green = Success
⚠️ Yellow = Warning
❌ Red = Error
Real-time Updates
Status messages during processing
Live statistics display
Progress indication
🐛 Troubleshooting
"Page context not recognized"
Cause: Not on a supported page type Solution: Navigate to a user profile, search results, or popular posts page

"No videos found"
Possible causes:

No videos on specified pages
Duration filter too restrictive
API returned no data
Solutions:

Try different page ranges
Remove duration filter
Check if user has video content
Slow performance
Causes:

Too many concurrent requests
Network issues
Large number of videos
Solutions:

Reduce "Max Concurrent Requests" in Settings (try 10-15)
Process fewer pages at once
Check network connection
Videos not loading
Cause: Lazy loading not triggered Solution: Scroll down to trigger IntersectionObserver

Duration check timeout
Cause: Video URL inaccessible or slow network Solution: Videos with timeout errors are skipped automatically

📊 Performance Metrics
Typical Processing Times
Small Job (1-2 pages, ~20 videos)
API Fetch: ~2-3 seconds
Duration Check: ~5-10 seconds
Total: ~10-15 seconds
Medium Job (5 pages, ~50 videos)
API Fetch: ~5-7 seconds
Duration Check: ~15-25 seconds
Total: ~25-35 seconds
Large Job (10 pages, ~100 videos)
API Fetch: ~10-12 seconds
Duration Check: ~30-50 seconds
Total: ~45-65 seconds
Resource Usage
Memory: Minimal (efficient cleanup)
Network: Configurable (1-100 concurrent)
CPU: Moderate during duration checks
🔍 Technical Details
DurationCheckerPool vs. Batch Processing
v4's DurationCheckerPool (Used in Hybrid):

class DurationCheckerPool {
constructor(maxConcurrent) {
this.queue = [];
this.activeCount = 0;
}

add(url) {
// Add to queue
// Process when slot available
}
}
Advantages:

More elegant and efficient
Better queue management
Real-time status updates
Automatic resource management
v5's Batch Processing (Not used):

async function batchProcessVideos(urls, batchSize) {
for (let i = 0; i < urls.length; i += batchSize) {
const batch = urls.slice(i, i + batchSize);
await Promise.all(batch.map(process));
}
}
Disadvantages:

Less flexible
Waits for entire batch
No queue visibility
API URL Construction
Popular Posts Example:

case 'popular_posts':
if (context.date != 'none' && context.period != "recent") {
queryParams.push(`date=${encodeURIComponent(context.date)}`);
}
if (offset > 0) queryParams.push(`o=${offset}`);
queryParams.push(`period=${encodeURIComponent(context.period)}`);
return `${baseApiUrl}/posts/popular?${queryParams.join('&')}`;
Lazy Loading Implementation
const videoIntersectionObserver = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
const video = entry.target;
const source = video.querySelector('source[data-src]');
source.setAttribute('src', source.getAttribute('data-src'));
video.load();
}
});
}, { rootMargin: '200px 0px' });
🎓 Best Practices
For Best Results
✅ Start with 1-2 pages to test
✅ Use duration filters only when needed
✅ Adjust concurrent requests based on system
✅ Check history to avoid re-filtering
✅ Export settings for backup
Performance Tips
Skip duration checks when not needed (much faster)
Use smaller page ranges for quicker results
Increase concurrent requests if system can handle it
Clear browser cache if experiencing issues
Workflow Tips
Save frequently used configurations
Use history to restore successful filters
Export settings before trying new configurations
Monitor status messages for issues
🆚 Comparison: v4 vs v5 vs Hybrid
Feature v4 v5 (Original) v5.1 Hybrid
Core Functionality


API Integration ✅ Complete ❌ Incomplete ✅ Complete
Popular Posts ✅ Yes ❌ No ✅ Yes
Duration Checking ✅ Pool System ⚠️ Batch System ✅ Pool System
Lazy Loading ✅ Yes ❌ No ✅ Yes
SPA Navigation ✅ Yes ❌ No ✅ Yes
Real-time Rendering ✅ Yes ❌ No ✅ Yes
UI/UX


Modern Design ❌ Basic ✅ Beautiful ✅ Beautiful
Tab System ❌ No ✅ Yes ✅ Yes
Statistics ⚠️ Basic ✅ Enhanced ✅ Enhanced
History ❌ No ✅ Yes ✅ Yes
Import/Export ❌ No ✅ Yes ✅ Yes
Overall


Functionality ✅ 100% ⚠️ 60% ✅ 100%
User Experience ⚠️ 60% ✅ 100% ✅ 100%
Rating ⭐⭐⭐⭐ ⭐⭐⭐ ⭐⭐⭐⭐⭐
📝 What's New in v5.1 Hybrid
Improvements Over v4
✅ Modern, beautiful UI with gradients and animations
✅ Tab-based organization (Filter, Settings, History)
✅ Enhanced statistics display
✅ Filter history with one-click restore
✅ Import/Export settings functionality
✅ Better status messages with color coding
✅ Improved button styling and interactions
Improvements Over v5
✅ Working API integration (not simulated)
✅ Popular posts support (critical feature)
✅ Efficient DurationCheckerPool (better than batch processing)
✅ Lazy loading videos (performance optimization)
✅ Real-time card rendering (better UX)
✅ SPA navigation handling (works with site navigation)
✅ Proper resource cleanup (no memory leaks)
🎉 Summary
The v5.1 Hybrid is the definitive version that combines:

✅ v4's rock-solid core functionality
✅ v5's stunning modern interface
✅ All features working perfectly
✅ Optimized performance
✅ Enhanced user experience
Use this version for the best experience! 🚀

📞 Support
Getting Help
Check this guide for common issues
Review the status messages for clues
Check browser console (F12) for errors
Try with default settings first
Test on different page types
Reporting Issues
Include:

Browser and version
Page type (profile, search, popular)
Steps to reproduce
Error messages
Settings used
Enjoy the ultimate video filtering experience! 🎬✨