Amazon Sponsored Content Dimmer
Overview
This Tampermonkey script helps visually identify sponsored content on Amazon without completely removing it. Instead of removing ads, it partially dims them, allowing users to decide whether they want to interact with the content or not.
Main Features
Visual Dimming
- Semi-transparent overlay on sponsored products
- Clear "Sponsored" badge
- Hover effect for better content visibility
- Doesn't block functionality, just makes it less prominent
Smart Detection
- Identifies multiple types of sponsored content
- Multi-language support (English, Spanish, French, German, Japanese, Chinese)
- Detection by specific selectors and text
- Dynamic updates with new content loading
Compatibility
- Works on all Amazon regional versions
- Compatible with dark and light modes
- Adaptable to different Amazon layouts
- Works on search and product pages
Installation
Prerequisites
- Compatible browser (Chrome, Firefox, Edge, Safari)
- Tampermonkey extension installed
Installation Steps
1. Open Tampermonkey Dashboard2. Click 'Create new script'3. Copy and paste the complete code4. Save with Ctrl+S or ⌘+S
Customization
Modify Appearance
Dimming Opacity
.sponsored-content-dimmed::before {background-color: rgba(0, 0, 0, 0.7); /* Adjust last number */}
Badge Color
.sponsored-badge {background-color: #ff9900; /* Change color */}
Displayed Text
.sponsored-content-dimmed::before {content: "Your Text Here";}
Adjust Behavior
Transition Speed
.sponsored-content-dimmed::before {transition: opacity 0.3s ease; /* Adjust time */}
Hover Transparency Level
.sponsored-content-dimmed:hover::before {opacity: 0.3; /* Adjust value between 0 and 1 */}
Troubleshooting
Common Issues and Solutions
Some Ads Not Dimming
- Verify page is fully loaded
- Refresh the page
- Check conflicts with other scripts
Legitimate Elements Being Dimmed
- Adjust selectors in SPONSORED_SELECTORS
- Modify keywords in SPONSORED_KEYWORDS
Performance Issues
- Increase setTimeout delay
- Reduce check frequency
Script Compatibility
- Compatible with most Amazon scripts
- May require adjustments if used with:
- Price change scripts
- Interface modifiers
- Price comparison tools
Technical Notes
Code Structure
1. Configuration and Styles2. Detection Functions3. Processing Functions4. Observer and Event Listeners
Performance
- Optimized MutationObserver usage
- Batch element processing
- Frequent selector caching
- Minimized reflows and repaints
Security
- Doesn't modify critical content
- Doesn't interfere with purchasing functionality
- Maintains all product information accessible
Best Practices
Recommended Usage
- Keep script updated
- Report unexpected behavior
- Periodically check for new ad types
Maintenance
- Periodically review keywords
- Update selectors if Amazon changes structure
- Adjust styles as needed
Planned Future Updates
- Support for more Amazon regions
- User-configurable options
- Improved detection of new ad formats
- Price tool integration
Credits
- Developed by Mauricio Bridge
- Based on analysis of multiple similar scripts
- Thanks to the userscript community
License
MIT License - Free use and modification