Back to feed

vuciv/artblock

vuciv/artblock
249
+17/day
13
JavaScript

Every ad on the internet, replaced with fine art from public museum and NASA collections.

From the README

Artblock

Every ad on the internet, replaced with fine art.

Artblock is a Chrome extension that detects advertisements, sponsored content, affiliate widgets, and promotional clutter on the pages you visit and swaps them for artwork from three public, open-access collections:

  • 🏛 Art Institute of Chicago — paintings, Japanese woodblock prints, photography (Monet, Hokusai, O'Keeffe, and thousands more)
  • 🏛 The Metropolitan Museum of Art — centuries of painting, sculpture, and design
  • 🌌 NASA Image Library — nebulae, galaxies, Earthrise, the Pillars of Creation

Features

  • Detects Google Ads, DoubleClick, Amazon, Taboola/Outbrain, MGID, RevContent, sponsored content, affiliate widgets, newsletter/paywall prompts
  • Categories: Impressionism, Japanese Woodblock, Renaissance, Photography, Modern/Contemporary, NASA Space, or Chaos Mode
  • Never shows you the same image twice in a session
  • Hover any replaced slot to see the title, artist, date, and source museum
  • Per-tab toolbar badge counts how many ads have been replaced on the current page

Install

From the Chrome Web Store / Firefox Add-ons

(Coming soon on both.)

Unpacked (development)

Chrome / Edge / Brave

  1. Clone this repo: `git clone
  2. Open chrome://extensions, enable Developer mode
  3. Click Load unpacked, select the repo root
  4. Visit any ad-supported site — the replacements happen automatically

Firefox

  1. Clone the repo
  2. Run ./build.sh — produces artblock-firefox-v1.0.0.zip
  3. Open about:debugging#/runtime/this-firefoxLoad Temporary Add-on → select the zip (or the repo's manifest.firefox.json)

Building release packages

./build.sh

Produces artblock-chrome-vX.Y.Z.zip and artblock-firefox-vX.Y.Z.zip, ready to upload to their respective stores. The Firefox build uses manifest.firefox.json, which adds browser_specific_settings.gecko.id (required by AMO) and an event-page background.scripts declaration for compatibility with Firefox 109+.

How it works

  • content/detector.js scans the DOM for ad containers via curated CSS selectors and IAB ad-size heuristics, skipping nested matches so only the outermost ad slot is replaced.
  • content/observer.js watches for dynamically-injected ads via MutationObserver.
  • content/replacer.js swaps each detected slot for an `` sized to fit, with a hover tooltip showing the artwork metadata.
  • background/service-worker.js fetches art metadata from the three public APIs and caches it per aspect-ratio bucket in chrome.storage.local, so replacements are instant and never repeat within a session.

Privacy

Artblock collects nothing. No analytics, no accounts, no telemetry, no browsing history. The only outbound requests it makes are to the three public museum/NASA APIs, and those requests carry nothing but a generic search term. See PRIVACY.md.

Credits

Artwork and imagery are sourced from the open-access programs of the [A