AliExpress Advanced Search UI

Upgrades AliExpress with an advanced search UI for filtering products by keywords, phrases, and logical operators.

作者
LetMeFixIt
今日安裝
1
安裝總數
1
評價
0 0 0
版本
1.0
建立日期
2025-10-01
更新日期
2025-10-01
尺寸
12.3 KB
授權條款
MIT
腳本執行於

AliExpress Advanced Search UI Guide

This guide provides a detailed overview of the "AliExpress Advanced Search UI" Tampermonkey script. This script enhances your AliExpress browsing experience by adding a powerful and intuitive filter bar directly below the main search bar, allowing for precise and complex filtering of product listings.

AliExpress Advanced Search UI

1. Introduction

The AliExpress Advanced Search UI script is designed for users who want more control over their search results. It introduces an advanced search bar that allows you to filter products using keywords, exact phrases, and logical operators (AND, OR, NOT). This functionality is especially useful when you need to narrow down a large number of listings to find exactly what you're looking for.

2. Key Features

The script adds a new UI component with several key features:

  • Filter Input Box: This is where you'll type your advanced search queries. It provides a placeholder with an example to guide you.
  • On/Off Toggle Switch: A toggle switch allows you to enable or disable the filter at any time. When disabled, all products are visible.
  • Clear Button: A convenient "×" button appears inside the input box when you start typing, allowing you to clear your query with a single click.
  • Help Icon (?): A help icon provides a quick reference tooltip with the available filtering rules, so you never have to guess the syntax.

3. How to Use the Filter (Filtering Rules)

The script supports a powerful set of rules to refine your search. Here’s how to use them:

  • Implicit AND: Simply type words one after another to find products that contain all of them.
    • Example: usb c cable will show products with "usb", "c", and "cable" in their titles.
  • Exact Phrase: Enclose a phrase in double quotes (" ") to find products with that exact wording.
    • Example: "hdmi adapter" will show products containing the exact phrase "hdmi adapter".
  • Excluding Terms: Add a hyphen (-) before a word or phrase to exclude it from the search results.
    • Example: phone holder -car will show phone holders that are not for cars.
  • OR Logic: Use the OR operator (must be in uppercase) to find products that contain at least one of the specified terms.
    • Example: samsung OR xiaomi will show products from either brand.
  • Grouping with Parentheses: Use parentheses (( )) to group terms and create more complex and specific queries.
    • Example: (samsung OR xiaomi) AND "fast charging" will find products from either Samsung or Xiaomi that also include the phrase "fast charging".

4. How It Remembers Your Filter

To enhance your browsing experience, the script automatically saves your last-used filter query and the on/off state of the toggle switch. This means that if you refresh the page or navigate to a new search result, your filter settings will be preserved for the duration of your session.

5. How It Works (A Simple Explanation)

For those curious about the script's inner workings, here is a non-technical breakdown of its logic:

  1. Inject UI: The script first adds the advanced filter bar below the standard AliExpress search bar.
  2. Parse Query: When you type a query, the script breaks it down into individual components (words, phrases, operators). It automatically inserts an AND between terms that don't have an explicit operator.
  3. Convert to RPN: The query is then converted into Reverse Polish Notation (RPN), a format that makes it easy for the computer to evaluate the logical expression.
  4. Evaluate Products: For each product on the page, the script reads its title.
  5. Apply Filter: It then evaluates your RPN query against the product's title. If the title matches, the product is shown; otherwise, it is hidden.
  6. Real-Time Updates: This process runs automatically as you type and whenever the page content changes, ensuring the filter is always up-to-date.

This simple yet powerful logic allows you to dynamically and instantly refine your search results without needing to perform a new search each time.