Amazon: strip sponsored tiles from the DOM
Continuously removes sponsored tiles from the DOM tree, including those loaded while scrolling.
Code to copy
// Remove sponsored result tiles from the DOM as they load
function stripSponsored() {
const sel = '.s-result-item.AdHolder,' +
'.s-result-item:has([data-component-type="sp-sponsored-result"]),' +
'.s-result-item:has(.puis-sponsored-label-text)';
document.querySelectorAll(sel).forEach(function (el) {
el.remove();
});
}
stripSponsored();
const obs = new MutationObserver(stripSponsored);
obs.observe(document.documentElement, { childList: true, subtree: true });
How to use this example
- Copy the code with the button above.
- Install JustZix (2 minutes) and open the extension on the target page.
- Add a new rule matching that page.
- Paste the code into the rule's JavaScript panel and save — it runs on every page visit.
Rate this example
No ratings yet — be the first.