Camerax Floating Live Multi-Term Search + Price Sort (Stable)

Stable: floating purple search, multi-term partial AND filtering, re-sorts visible items by price, preserves grid without assumptions about wrapper classes.

当前为 2025-09-25 提交的版本,查看 最新版本

作者
Matthew Kelley
评分
0 0 0
版本
2.21
创建于
2025-09-25
更新于
2025-09-25
大小
10.1 KB
许可证
GNU GPLv3
适用于

The Camera Exchange (Camerax.com) Floating Live Multi-Term Search + Price Sort

Floating bright purple search & sort tool for Camerax used-gear pages — multi-term partial AND filtering + reliable price sorting while preserving site layout.


Overview

I wasn't happy with the search results on the site or the filtering, so I made up this Tampermonkey/Greasemonkey userscript to improve Camerax product listing pages by adding a persistent floating search widget that:

  • Filters results live using multiple space-separated terms (partial words allowed; all terms must match — AND logic).
  • Re-sorts the visible results by the actual displayed price (handles sale ins prices).
  • Preserves the original grid/layout by moving whole wrappers (no layout collapse).
  • Includes UI controls: Asc/Desc toggle and Clear button.
  • Defensive and resilient: re-collects entries dynamically (works with pagination/AJAX/DOM updates) and avoids breaking the page.

Target pages (example):
https://camerax.com/product-category/


Features

  • Multi-term search: type nikon 50 to show items containing both nikon and 50 anywhere in title/condition/price text. Partial matches OK.
  • Live filtering as you type (debounced for performance).
  • Price parsing picks the visible amount (works with del + ins sale markup).
  • Re-sorts only visible results so filtered lists remain price-ordered.
  • Floating, highly visible purple UI that stays on screen while you browse.
  • Non-destructive: uses inline display toggles and appends existing wrappers — it does not rewrite product content.

Installation

  1. Install Tampermonkey or Greasemonkey in your browser.
  2. Create a new userscript and paste the full script contents (or install from a hosted Gist/GitHub/Greasy Fork).
  3. Ensure the script is enabled in Tampermonkey and visit a Camerax used-gear page. The purple floating widget should appear top-right.

The script @match is set for Camerax used-gear pages. You may expand @match inside the script if you want broader coverage.


Usage

  • Type one or more space-separated search terms into the floating search box. Every term must match somewhere in the product text (title + condition/price metadata).
  • Click Asc to toggle sorting order (changes to Desc).
  • Click Clear to reset the filter and show all products again.
  • The script automatically re-sorts the currently visible items by their parsed numeric price.

Examples

  • nikon → show any item with “nikon”.
  • nikon 50 → show items containing both nikon AND 50.
  • zeiss excellent → show Zeiss items in Excellent condition.

Troubleshooting

  • Widget not visible
    • Confirm the script is enabled in Tampermonkey.
    • Ensure the page URL matches the script’s @match.
    • Open the browser console to check for script messages.
  • Grid layout looks off
    • The script appends wrapper elements that are children of the .products container to preserve layout. If markup differs across pages, minor selector tweaks may be required.
  • No prices parsed
    • Some listings may display price text in an unexpected place; the parser targets typical WooCommerce markup.

Maintenance & Compatibility

  • The script observes DOM mutations and is designed to handle common theme/plugin updates.
  • If Camerax changes HTML structure significantly, the price/title selectors may require adjustments.
  • No updates will be given.

Privacy & Safety

  • The script runs entirely in the browser and does not transmit product data or your searches to any external servers.
  • It only reads DOM content and changes local display state.