Amazon Sponsored Content Dimmer

Oscurece parcialmente el contenido patrocinado en Amazon sin eliminarlo

作者
Mauricio Bridge
日安装量
0
总安装量
9
评分
0 0 0
版本
1.0
创建于
2024-11-07
更新于
2024-11-07
大小
5.8 KB
许可证
MIT
适用于

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

  1. 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
  2. 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
  3. 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

  1. Prerequisites

    • Compatible browser (Chrome, Firefox, Edge, Safari)
    • Tampermonkey extension installed
  2. Installation Steps

    1. Open Tampermonkey Dashboard
    2. Click 'Create new script'
    3. Copy and paste the complete code
    4. Save with Ctrl+S or ⌘+S
    

Customization

Modify Appearance

  1. Dimming Opacity

    .sponsored-content-dimmed::before {
       background-color: rgba(0, 0, 0, 0.7); /* Adjust last number */
    }
    
  2. Badge Color

    .sponsored-badge {
       background-color: #ff9900; /* Change color */
    }
    
  3. Displayed Text

    .sponsored-content-dimmed::before {
       content: "Your Text Here";
    }
    

Adjust Behavior

  1. Transition Speed

    .sponsored-content-dimmed::before {
       transition: opacity 0.3s ease; /* Adjust time */
    }
    
  2. Hover Transparency Level

    .sponsored-content-dimmed:hover::before {
       opacity: 0.3; /* Adjust value between 0 and 1 */
    }
    

Troubleshooting

Common Issues and Solutions

  1. Some Ads Not Dimming

    • Verify page is fully loaded
    • Refresh the page
    • Check conflicts with other scripts
  2. Legitimate Elements Being Dimmed

    • Adjust selectors in SPONSORED_SELECTORS
    • Modify keywords in SPONSORED_KEYWORDS
  3. 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 Styles
2. Detection Functions
3. Processing Functions
4. 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

  1. Recommended Usage

    • Keep script updated
    • Report unexpected behavior
    • Periodically check for new ad types
  2. 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