Skip to content

Releases: darkwebdev/amazon-returns

v1.4.0

28 Jan 15:34

Choose a tag to compare

Release Notes - v1.4.0

What's New

Dual Badge Injection

The extension now shows the "Returns ▾" badge in two locations on Amazon product pages:

  • In the buy box area (before delivery information)
  • In the returns section area (near VAT/price information)

This provides better visibility and ensures users can always find return cost information regardless of where they're looking on the page.

Amazon-Native Badge Implementation

Completely redesigned to use Amazon's exact HTML structure and styling:

  • Uses Amazon's official badge components (#creturns-return-policy-message)
  • Matches Amazon's popover behavior and appearance
  • Seamless integration with Amazon's UI for a native experience
  • Better accessibility with Amazon's ARIA patterns

Firefox Improvements

  • Fixed popover width issue in Firefox where text was wrapping too narrowly
  • Increased popover width from 280px to 350px with min-width: 280px
  • Better content display with width: max-content for optimal readability

Performance Optimizations

  • 5x faster detection: Reduced polling interval from 500ms to 100ms
  • 60% faster timeout: Reduced timeout from 5s to 2s
  • Early exit check for FREE Returns detection to minimize unnecessary processing
  • Fixed badge existence check to use correct container ID

Security Enhancements

  • Replaced all innerHTML assignments with safe DOM manipulation
  • Eliminated security warnings about dynamic content injection
  • Maintains visual styling while using textContent and appendChild

Technical Details

Detection Improvements

The extension now checks two containers for Amazon's FREE Returns badge:

  • #shippingMessageInsideBuyBox_feature_div (buy box area)
  • #freeReturns_feature_div (returns section)

When Amazon shows FREE Returns in either location, the extension correctly hides its badge to avoid duplicate information.

Code Quality

  • Updated all tests to match new FREE Returns detection behavior
  • 44 tests passing with improved coverage
  • Removed unsafe innerHTML usage for browser store compliance

Bug Fixes

  • Fixed narrow popover in Firefox (now 280-350px wide)
  • Corrected badge existence check using proper container ID
  • Fixed race condition with early exit for FREE Returns

Breaking Changes

None - this is a backward-compatible minor release.

Upgrade Notes

No action required. The extension will automatically update through browser stores.

Known Issues

None


Full Changelog: v1.3.0...v1.4.0