Amazon Seller Country Badge
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
This script adds visual country flag badges next to Amazon seller names on product detail pages. When you view a product, the script identifies the seller information section (the "Sold by" or "Ships from" text), extracts the seller name, and determines the seller's country of origin. It then displays an emoji flag badge right next to the seller name, letting you instantly see where the seller is located. Hovering over the flag shows a tooltip with the seller name, location, and country name. This is especially useful for identifying overseas sellers, checking if the seller is Amazon itself (FBA), or quickly spotting sellers from specific countries you prefer. The script works with both Fulfillment by Amazon (FBA) sellers and third-party sellers, and updates automatically when product variations are selected.
WHERE IT RUNS
The script runs on all major Amazon domains, including .com, .co.uk, .ca, .de, .fr, .it, .es, .com.au, and .co.jp. It works on product detail pages (those with /dp/, /product/, or /gp/product/ in the URL) that display seller information. It handles both desktop and mobile views, and updates dynamically when product variations (like size or color) change the seller.
HOW TO USE
After installation, the settings panel appears on the left side of the screen with the gear emoji (⚙️). Open the panel to configure the script:
- The "Show seller country badges" toggle enables or disables the flag badges.
- Toggle "Show flags" to show or hide the flag emojis (when disabled, only a generic globe icon appears).
- Click "Refresh seller badges" to manually re-scan the page for seller information.
- Click "Clear seller cache" to remove stored location data and force re-detection.
The script works automatically—just visit any Amazon product page and flags will appear next to the seller name. Hover over a flag to see detailed seller information.
TECHNICAL SECTION — REAL MECHANISM
The script detects product pages by checking the URL for /dp/, /product/, or /gp/product/. It finds seller information elements using multiple selectors, including #sellerProfileTriggerId, #bylineInfo, .a-link-normal, #sellerName, and .seller-name, filtering for elements that contain text like "Sold by," "ships from," or "Fulfilled by." For each seller element, the script extracts the seller name by parsing text after "Sold by" or using the link text itself. It extracts location information by searching the parent element's text for patterns like "from [location]," "located in [location]," "based in [location]," or text within parentheses. If no location is found, the script performs a fuzzy lookup on the seller name for country names or country codes. If still no location is found, it uses the domain's country as a fallback (e.g., amazon.co.uk suggests a UK seller). Seller location data is cached using GM_setValue with a key derived from the seller name and location to avoid re-parsing. A flag is determined from a built-in mapping of country codes to emoji flags. The badge is inserted into the DOM using textContent and style properties (never innerHTML), positioned next to the seller element. A tooltip is created on hover using a fixed-position div that displays seller name, location, and country. A MutationObserver watches for DOM changes and updates badges when product variations are selected.
THE PANEL
The settings panel is built with BotGentz's BGPanel component. It is draggable via its header, allowing you to reposition it anywhere on the screen. The panel snaps to the left edge by default but can be moved freely. Click the gear emoji to collapse the panel into a small bubble, and click the bubble to expand it again. The panel remembers its position per page session. Press the Escape key to quickly close or minimize the panel. The panel includes a status flash bar that provides visual feedback when settings are changed or actions are performed. All settings and cached data save automatically via GM_setValue.
PLEASE NOTE
This script requires the free BotGentz browser extension to run. It does not function as a standalone Chrome extension and does not use chrome.* APIs. Amazon frequently updates its product page structure and seller information layout, which may break the selectors used to find seller elements. If flags stop appearing, please check for script updates. Seller location detection relies on text parsing and heuristics—it may not be 100% accurate for all sellers. The script uses domain-based heuristics as a fallback, which may not reflect the actual seller location. The script stores only cached seller location data and preferences via GM_setValue. No data is sent externally—all data is stored locally in your browser. The script never reads or writes password fields, hidden inputs, or file inputs. All DOM operations use safe methods (style properties, textContent, appendChild) and never use innerHTML.