How it works
Trade Me is an Angular app built from clean custom elements, so the signals are stable tag names rather than anything that needs de-obfuscating:
| Target | Selector | Action |
|---|---|---|
| Sponsored / Promoted listing | tm-sponsored-listings-tag | hide its tg-col grid cell |
| Promoted "super feature" card | .tm-marketplace-search-card--super-feature | hide its tg-col grid cell |
| Display ad | tm-display-ad-wrapper, tm-fuse-display-ad, tm-adsense | hide its tg-col (or the ad) |
| Top banner ad | tm-shell-leaderboard-ad | hide the banner |
Each listing lives in a tg-col grid cell, so hiding the whole cell lets the results grid reflow with no gaps. A MutationObserver re-applies the filter as you paginate, change filters or switch views.
Options (toolbar popup)
- Declutter listings: master on/off.
- Hide Sponsored / Promoted and Hide Advertisements (display ads plus the top banner): each independently.
- Dim instead of remove: fade and collapse hidden items, hover to peek.
- A live count of items hidden on the current page.
What it can touch
| Manifest entry | Why it is there |
|---|---|
permissions: ["storage"] | Your popup settings, kept in chrome.storage.sync. That is the only permission requested. |
host_permissions | None. Not requested, not needed. |
content_scripts.matches: ["https://*.trademe.co.nz/*"] | HTTPS only, and only trademe.co.nz. No other site is touched. |
content_scripts.all_frames: false | Top-level document only; nothing is injected into embedded iframes. |
run_at: "document_start" | So the page is filtered as it renders rather than flashing unfiltered first. |
content_security_policy | script-src 'self': no remote code, no eval, no inline script. |
chrome.storage.sync (so they follow your Chrome profile) and nothing else is stored.What it does not do
- Does not bid, buy, watch, message or list anything on your behalf.
- Does not read cookies, tokens or credentials.
- Does not hide organic listings, including ones that merely carry a "Save 20%" discount badge; only paid placement goes.
- Does not load anything from the network, ever.
Honest caveats
- Trade Me's component tag names are stable, but if they are ever renamed the selectors in
content.jsare where to adjust.
Security
Follows the repo's shared security guidelines (the OWASP Browser Extension Vulnerabilities Cheat Sheet): storage is the only permission, the content script runs HTTPS-only in the top frame, a strict CSP forbids remote code, no innerHTML or eval, no network calls, and popup↔page messaging checks sender.id. A static audit (tests/owasp-audit.mjs) enforces all of that on every extension in the repo.
Install
- Download or clone the repo.
- Open
chrome://extensionsand turn on Developer mode (top right). - Click Load unpacked and choose the
chrome-extensions/trademe-remove-promoted-listingsfolder.