Back to blog
technical·5 min read

Why the Save pill shows up on every Google Maps place panel

A short technical piece on how the Chrome extension detects a Maps or Search place panel and shows the Save action — and why that detection runs locally, not on a server.

The most visible piece of Leadline is the Save pill — a small “Save” button that appears inside Google Maps place panels and Google Search knowledge panels, asking whether you’d like to file the current place into your list.

People ask how it works, why it doesn’t violate Google’s terms of service, and what happens when Google changes the layout. This post answers all three.

What the Save pill is, mechanically

The Chrome extension injects a content script into maps.google.com and www.google.com (the Search page). The content script runs on every page load and on every history change inside those origins.

The script watches for a known set of DOM patterns that indicate a place panel is open:

  • A data-item-id attribute on a div with class names matching Google Maps’ place panel.
  • An aria-label containing the business name plus “place” or “result”.
  • A specific test ID pattern that Google Maps uses for place cards.

When one of those patterns matches, the script renders a small Save button next to the existing “Directions” / “Save” / “Share” buttons. The button is a sibling of Google’s own UI; it does not overlay or replace anything.

When you click Save, the content script reads the place name, address, phone, website, hours, category, and rating from the rendered DOM and writes them to the extension’s local storage. The row appears in your list immediately. No network call to a server happens — the row lives in the browser’s extension storage until you sync to a workspace or export.

Why it runs locally, not on a server

This is a deliberate architectural choice with three reasons:

  1. It is the only way to be legal with Google’s terms. Google Maps’ terms forbid automated scraping of their pages by agents other than the user’s own browser. A server-side scraper that fetches Maps pages on behalf of many users is the kind of thing Google has sued over. A client-side script that reads the page the user is already looking at, in their browser, is not — it’s the same as the user reading the page themselves and typing into a spreadsheet.
  2. It is the only way to be honest about scale. A server-side scraper can fetch 10,000 places per hour across many users. That’s the scale that gets a service flagged and shut down. A client-side script can only read what the user is already looking at, which is on the order of tens of places per hour per user. The throughput is honest because it matches the user’s attention.
  3. It is the only way to not need a backend. Most prospect-data tools run as SaaS because their harvest is server-side. Leadline doesn’t need a server to harvest. The extension is the whole harvest pipeline. The server only exists when you opt in (Team mode), and even then it only handles the shared workspace — not the harvest itself.

What happens when Google changes the layout

Google Maps changes its DOM roughly quarterly. Each change breaks our detection patterns. When that happens:

  • The Save pill stops showing in the affected panel.
  • The grid sweep continues to work for cells where the patterns still match; cells where the patterns broke get skipped (with a “couldn’t read” count in the progress label).
  • An extension update ships within a few days to restore the patterns.

The extension updates through the Chrome Web Store like any other extension. Users get the fix automatically; no action required.

We track the layout changes in the changelog. If you want to know whether a recent Maps redesign broke the extension, the changelog entry for the affected version will say.

What this is not

A few honest things:

  • Not a headless browser. We do not run Chrome instances in the cloud to fetch Maps for you. Your browser, your session, your cookie jar.
  • Not a workaround for anti-scraping measures. If Google returns a different page to your browser because it thinks you’re a bot, you get the different page. Leadline reads what your browser sees. If you have anti-bot friction, you have anti-bot friction.
  • Not a way around Maps’ rate limits. Maps throttles pan + zoom after a while. Leadline slows down with Maps. If Maps gives you 200 results for a query, Leadline can harvest those 200.

How to tell the pill is working

If you open a place panel and the Save pill shows up next to Google’s own buttons, the extension is working. If it doesn’t, either the page hasn’t loaded yet (wait a second), the layout changed (check the changelog for a known issue), or you navigated away from a Maps or Search page.

You can verify in chrome://extensions that Leadline is installed and active on the current site. If the site permissions include maps.google.com and www.google.com, the content script is running.

A short tour of the detection logic

If you’re curious about the actual detection:

// content script — runs on maps.google.com
const observer = new MutationObserver(() => {
  const panel = document.querySelector('[data-item-id], [aria-label*="place"], [jsaction*="placeCard"]');
  if (panel && !panel.querySelector('.scraper-save-pill')) {
    renderSavePill(panel);
  }
});
observer.observe(document.body, { childList: true, subtree: true });

The real code is longer (more patterns, more selectors, more edge cases for the panel opening animation, more handling for the panel closing), but the idea is the same. Watch the DOM, render the pill when a known pattern matches, never touch the underlying Google UI.

Where to go next

If you want to see the pill in action, install the extension, open Maps, click on any place panel.

If you want to read more:

  • Harvest a neighbourhood — the workflow that uses the Save pill alongside the grid sweep.
  • The dialer — what to do with the rows once you’ve saved them.
  • What we don’t do — for the boundaries, including why Leadline is not a list vendor.

The Save pill is one line of HTML inside one content script. The product is bigger than that, but the pill is the part you’ll see first.

#technical#extension#how-it-works