Instagram Content Filter Pro - Enterprise Edition

Barkin _MADD
2025-11-05T03:59:37Z

Advanced content filtering system for Instagram with robust detection, performance optimization, and comprehensive logging

Instagram Content Filter Pro - Enterprise Edition

The most advanced, feature-rich Instagram content filtering solution available. Built with enterprise-grade architecture, this userscript eliminates sponsored posts, suggested content, and unwanted recommendations from your Instagram feed with military precision.

🎯 Core Features

Advanced Content Detection

Multi-Pattern Matching System - Detects both exact and partial text matches

International Language Support - Filters content in English, Spanish, French, German, Japanese, and Chinese

Smart Text Normalization - Handles Unicode characters, whitespace variations, and case-insensitive matching

Intelligent Post Analysis - Deep DOM inspection to catch all variants of sponsored/suggested content

Customizable Filter Patterns - Add your own keywords and phrases to filter

Content Filtering Capabilities

✅ Sponsored Posts - Removes all sponsored/promoted content

✅ Suggested Posts - Eliminates "Suggested for you" posts

✅ Follow Recommendations - Hides "Follow" suggestions

✅ Suggested Users - Filters account recommendations

✅ Multi-Language Detection - Works across all Instagram language settings

✅ Dynamic Content - Handles infinite scroll and dynamically loaded posts

✅ Explore Page Filtering - Optional filtering on Explore page

✅ Reels Filtering - Optional filtering for Reels content

✅ Stories Filtering - Experimental support for Stories

🎨 User Interface

Floating Status Widget

Real-Time Statistics Dashboard - See filtering stats at a glance

Compact Mode - Minimal footprint showing only essential info

Expanded Mode - Detailed statistics and system metrics

Draggable Positioning - Move the widget anywhere on screen

Configurable Placement - Start in any corner (top-right, top-left, bottom-right, bottom-left)

Glassmorphism Design - Modern blur effects and smooth animations

Live Updates - Statistics refresh every second

Enable/Disable Toggle - Quick filter on/off button

Manual Scan Button - Force immediate feed scan

Cache Clear Button - Reset processing state

Auto-Hide Option - Configure auto-hide after inactivity

Opacity Control - Adjust widget transparency (0.0 - 1.0)

Widget Statistics Display

Posts Filtered Count

Posts Processed Count

Filter Success Rate (%)

Cache Size

System Uptime

Observer Status

Cache Hit Rate

Color-Coded Metrics (green/orange/red based on values)

Toast Notifications

Sleek Slide-In Animations - Non-intrusive notifications from bottom-right

Filtered Post Alerts - Shows count of newly filtered posts

Color-Coded Messages - Different colors for success/info/warning/error

Auto-Dismiss - Notifications fade out automatically

Customizable Duration - Control how long toasts stay visible

Can Be Disabled - Turn off notifications if preferred

⚡ Performance & Optimization

High-Performance Architecture

Batch Processing - Processes posts in configurable batches to prevent UI blocking

Debounced Mutations - Intelligent throttling of DOM change detection

LRU Cache System - Caches analysis results to prevent redundant processing

WeakSet Memory Management - Efficient tracking without memory leaks

Async Processing - Non-blocking operations for smooth browsing

Automatic Cache Expiration - Clears stale entries automatically

Performance Monitoring - Tracks FPS and memory usage

Optimized Selectors - Fast DOM queries with fallback strategies

Reliability Features

Watchdog Timer - Automatically recovers from stalls

Error Boundary - Graceful error handling with automatic recovery

Retry Mechanisms - Multiple attempts for failed operations

SPA Navigation Detection - Handles Instagram's single-page architecture

Page Visibility Handling - Pauses/resumes based on tab visibility

Observer Recovery - Auto-restarts if mutation observer stops

Fallback Hiding Methods - Multiple strategies to ensure posts are hidden

Safety Thresholds - Prevents runaway processing

🛡️ Advanced Features

Whitelist System

Never Filter Favorite Accounts - Protect posts from specific users

Easy Management - Add/remove accounts with simple commands

Username Detection - Automatically identifies post authors

Case-Insensitive Matching - Works regardless of capitalization

Persistent Configuration - Whitelist survives page reloads

Bulk Operations - Clear entire whitelist at once

List View - See all whitelisted accounts

Auto-Scroll Feature

Smart Scrolling - Automatically scrolls past filtered content

Configurable Speed - Choose between smooth and instant scrolling

Size Detection - Only scrolls for large filtered posts

Adjustable Delay - Control timing before scroll triggers

Non-Intrusive - Doesn't interfere with manual scrolling

Can Be Disabled - Toggle on/off as needed

Content Type Controls

Granular Filtering - Control what content types get filtered

Reels Toggle - Enable/disable Reel filtering independently

Stories Toggle - Experimental Stories filtering support

Explore Page Toggle - Control filtering on Explore page

Per-Type Configuration - Mix and match your preferences

🔧 Developer Features

Comprehensive Logging System

5 Log Levels - INFO, SUCCESS, WARN, ERROR, DEBUG, TRACE

Color-Coded Console Output - Easy-to-read colored logs

Timestamp & Elapsed Time - Track when events occur

Verbose Mode Toggle - Enable/disable detailed logging

Debug Mode - Extra diagnostic information

Log History Export - Save logs for troubleshooting

Statistics Tracking - Detailed performance metrics

Module-Based Logging - Each component logs separately

Global API (window.IGFilter)

Complete programmatic control with 40+ commands:

Control Commands

IGFilter.enable() - Enable the filter

IGFilter.disable() - Disable the filter

IGFilter.restart() - Restart the filter system

IGFilter.scan() - Manually scan feed now

Information Commands

IGFilter.stats() - Display detailed statistics table

IGFilter.status() - Show system status and health

IGFilter.listPatterns() - View all active filter patterns

IGFilter.help() - Show complete command reference

Configuration Commands

IGFilter.setVerbose(bool) - Toggle verbose logging

IGFilter.setDebug(bool) - Toggle debug mode

IGFilter.addPattern(str, type) - Add custom filter pattern

IGFilter.removePattern(str) - Remove filter pattern

Widget Commands

IGFilter.widget.show() - Show status widget

IGFilter.widget.hide() - Hide status widget

IGFilter.widget.expand() - Expand to detailed view

IGFilter.widget.collapse() - Collapse to compact view

IGFilter.widget.toggle() - Toggle filter on/off

Whitelist Commands

IGFilter.whitelist.add(username) - Add user to whitelist

IGFilter.whitelist.remove(username) - Remove from whitelist

IGFilter.whitelist.list() - List all whitelisted users

IGFilter.whitelist.clear() - Clear entire whitelist

IGFilter.whitelist.check(username) - Check if user is whitelisted

Toast Commands

IGFilter.toast.show(msg, type, duration) - Show custom toast

IGFilter.toast.success(msg) - Show success toast

IGFilter.toast.info(msg) - Show info toast

IGFilter.toast.warning(msg) - Show warning toast

IGFilter.toast.error(msg) - Show error toast

Settings Commands

IGFilter.settings.autoScroll(bool) - Toggle auto-scroll

IGFilter.settings.toasts(bool) - Toggle toast notifications

IGFilter.settings.filterReels(bool) - Toggle reel filtering

Maintenance Commands

IGFilter.clear() - Clear cache and reset state

IGFilter.exportConfig() - Export configuration as JSON

IGFilter.exportLogs() - Export log history as JSON

⚙️ Configuration Options

Feature Flags

VERBOSE_LOGGING: true           // Detailed console logging
PERFORMANCE_MONITORING: true    // Track execution metrics
DEBUG_MODE: false               // Additional debug info
VISUAL_INDICATORS: false        // Show indicators on filtered posts

UI Configuration

UI.ENABLED: true                // Show floating widget
UI.POSITION: 'top-right'        // Widget position
UI.COMPACT_MODE: true           // Start in compact mode
UI.DRAGGABLE: true              // Allow widget dragging
UI.OPACITY: 0.95                // Widget transparency
UI.AUTO_HIDE_DELAY: 0           // Auto-hide after N seconds
UI.SHOW_TOAST_NOTIFICATIONS: true // Show toast alerts

Auto-Scroll Configuration

AUTO_SCROLL.ENABLED: false      // Enable auto-scrolling
AUTO_SCROLL.SPEED: 'smooth'     // 'smooth' or 'instant'
AUTO_SCROLL.DELAY: 500          // Delay before scroll (ms)

Whitelist Configuration

WHITELIST.ENABLED: true         // Enable whitelist
WHITELIST.ACCOUNTS: []          // Array of usernames

Content Type Filters

CONTENT_TYPES.FILTER_REELS: false    // Filter Reels
CONTENT_TYPES.FILTER_STORIES: false  // Filter Stories
CONTENT_TYPES.FILTER_EXPLORE: true   // Filter Explore page

Performance Tuning

DEBOUNCE_DELAY: 150             // Mutation processing delay
BATCH_SIZE: 10                  // Posts per batch
MAX_RETRY_ATTEMPTS: 3           // Retry failed operations
OBSERVER_THROTTLE: 100          // Observer callback throttle
CACHE_DURATION: 5000            // Cache expiration time
MAX_POSTS_PER_SCAN: 100         // Maximum posts per scan
WATCHDOG_TIMEOUT: 30000         // Inactivity timeout

📊 Statistics & Monitoring

The script tracks comprehensive metrics:

Posts Processed - Total posts analyzed

Posts Filtered - Total posts hidden

Filter Efficiency Rate - Percentage of posts filtered

Cache Hits/Misses - Cache performance metrics

Cache Size - Current cache entries

Observer Callbacks - Mutation observer activity

Errors & Warnings - System health indicators

System Uptime - Time since initialization

FPS Monitoring - Frame rate tracking (if enabled)

Memory Usage - JavaScript heap size (if available)

🚀 Installation

1. Install a userscript manager:

Violentmonkey (Recommended)

Tampermonkey

Greasemonkey

2. Click the Install button on this script's page

3. Visit Instagram.com

4. The script starts automatically - look for the floating widget in the top-right corner

💡 Usage Examples

Basic Usage

The script works automatically once installed. Just browse Instagram normally!

Whitelist Your Friends

// In browser console
IGFilter.whitelist.add('bestfriend')
IGFilter.whitelist.add('familymember')
IGFilter.whitelist.list()  // See all whitelisted

Add Custom Filter Patterns

// Filter posts containing "reels"
IGFilter.addPattern('reels', 'partial')

// Filter exact word "promoted"
IGFilter.addPattern('promoted', 'exact')

// Remove a pattern
IGFilter.removePattern('reels')

Configure Auto-Scroll

// Enable smooth auto-scrolling
IGFilter.settings.autoScroll(true)

// Adjust in CONFIG object
CONFIG.AUTO_SCROLL.SPEED = 'instant'
CONFIG.AUTO_SCROLL.DELAY = 300

Adjust Widget

// Hide widget but keep filtering active
IGFilter.widget.hide()

// Show it again
IGFilter.widget.show()

// Expand for details
IGFilter.widget.expand()

Disable Logging

// Turn off verbose logs
IGFilter.setVerbose(false)

// Turn off debug mode
IGFilter.setDebug(false)

View Statistics

// Show detailed stats table
IGFilter.stats()

// Check system status
IGFilter.status()

// View performance report
IGFilter.exportConfig()

🎓 Technical Details

Architecture

Modular Class-Based Design - Separation of concerns with dedicated modules

Observer Pattern - MutationObserver for dynamic content

Cache Strategy - LRU cache with TTL expiration

Event-Driven - Non-blocking asynchronous operations

Defensive Programming - Extensive error handling and recovery

Memory Efficient - WeakSet tracking, automatic cleanup

Browser Compatibility

✅ Chrome/Chromium (Recommended)

✅ Firefox

✅ Edge

✅ Opera

✅ Brave

✅ Safari (with userscript manager)

Modules

1. Logger Module - Comprehensive logging system

2. Utility Module - Helper functions and tools

3. Cache Module - Post analysis caching

4. Content Analyzer Module - Pattern matching engine

5. Post Filter Module - Post hiding and management

6. Mutation Observer Module - DOM change detection

7. Status Widget Module - UI component

8. Toast Notification Module - User notifications

9. Whitelist Module - Account protection

10. Error Boundary Module - Error handling

11. Visibility Handler Module - Tab visibility

12. Navigation Handler Module - SPA routing

13. Performance Monitor Module - Metrics tracking

14. Initialization Module - Startup and coordination

🔒 Privacy & Security

No Data Collection - Zero telemetry or tracking

No External Requests - All processing is local

No Credentials Required - Works without login to the script

Open Source - Fully auditable code

No Advertisements - Completely ad-free

No Analytics - Your browsing stays private

🐛 Troubleshooting

Posts Not Being Filtered

// Force a manual scan
IGFilter.scan()

// Check if observer is running
IGFilter.status()

// Restart the system
IGFilter.restart()

// Clear cache and rescan
IGFilter.clear()
IGFilter.scan()

Widget Not Visible

// Show the widget
IGFilter.widget.show()

// Check if UI is enabled in config
console.log(CONFIG.UI.ENABLED)

Too Many/Few Posts Being Filtered

// View current patterns
IGFilter.listPatterns()

// Add more patterns
IGFilter.addPattern('keyword', 'partial')

// Whitelist accounts you want to see
IGFilter.whitelist.add('username')

Performance Issues

// Disable verbose logging
IGFilter.setVerbose(false)

// Reduce batch size in CONFIG
CONFIG.BATCH_SIZE = 5

// Increase processing delays
CONFIG.DEBOUNCE_DELAY = 300

📝 Changelog

Version 1.0.0 (Current)

✨ Initial release

✨ Enterprise-grade filtering engine

✨ Floating status widget with real-time stats

✨ Multi-language support (6 languages)

✨ Toast notification system

✨ Whitelist functionality

✨ Auto-scroll feature

✨ Content type filters

✨ Comprehensive API (40+ commands)

✨ Performance monitoring

✨ Advanced caching system

✨ Error recovery mechanisms

✨ Complete logging system

🎉 Credits

Author: Barkin MADDOX feat. Claude Code
GitHub: BarkinMad
License: MIT

Transform your Instagram experience today. No more sponsored posts. No more suggested content. Just the posts you actually want to see. 🚀