Back to projectsAutomation script

LookMovie Ad Blocker

LookMovie userscript that removes ad interruptions, handles specific dialogs, and manages reCAPTCHA-related elements more safely.

Context

Built around a specific site where player interruptions are frequent and the DOM changes often enough that blunt element removal can break the viewing flow.

Problem

Ads, banners, and recurring prompts interrupt playback, but aggressive cleanup can also interfere with threat-protection or CAPTCHA-related elements if not handled carefully.

Solution

The script continuously monitors the page, closes player ads, removes banners, handles the 'I Prefer Ads' dialog, and excludes threat-protection elements while still reducing interruptions.

Key decisions

  • -Used debounced monitoring so the script stays responsive without hammering the page.
  • -Explicitly protected threat-protection elements instead of removing everything that looked similar.
  • -Added retry logic because ad-related DOM changes do not always appear in a stable order.

Key features

  • -Automatic player-ad closure
  • -Banner-ad removal
  • -Handling for ad-preference dialogs
  • -Selective reCAPTCHA and threat-protection management
  • -Continuous monitoring with retry behavior

Results

  • -Improves a brittle viewing flow without relying on a single selector pass.
  • -Shows more careful DOM automation than a naive ad-removal script.
  • -Adds a good example of balancing automation with defensive behavior.

Stack

JavaScriptTampermonkeyAd Blocking

Links