Gopher
Gopher is a browser extension for Chrome and Firefox. It replaces the slow post browser of Patreon with a fast explorer for the memberships of a patron. The explorer shows a list of memberships, filters for each media type, and a viewer for each media type:
- Images — a grid of images and a full-size viewer
- Audio — an
<audio>element - Text — the text of the post, with a filter that permits safe HTML only
- Files — a table with the name, the type, and the size
- Video from Patreon — the
hls.jsplayer - Video from another server — an iframe for YouTube or Vimeo; you must click before it loads
The name refers to the Gopher protocol of 1991. The name does not contain “Patreon”. This is a trademark decision, and it is binding. The description can refer to Patreon, because that use is permitted. The product also shows this text: “Not affiliated with or endorsed by Patreon”.
How Gopher operates
All code runs in your browser. Gopher has three parts:
- A runner. This is a content script on
patreon.com. It reads the internal JSON:API of Patreon with the session that you are already signed in with. Gopher does not read your password and does not read your cookies. The request has the same origin as the page, thus the browser adds the session itself. The runner then puts the answer into a simple form and sends it in a message. It does not write the cache, because a content script has the origin ofpatreon.comand thus a different database. Read the runner. - A service worker. It limits the number of requests, receives the data, and writes it to the cache (Dexie and IndexedDB) in the origin of the extension. It never calls Patreon itself. Read the service worker.
- A panel (TypeScript and React, built with WXT). It shows the data from the cache. One set of components makes the Chrome side panel, the Firefox sidebar, and a full browser tab. Read the panel.
Gopher gets 20 posts at a time from /api/posts, puts them into a simple form, and keeps them in
IndexedDB. The next visit reads the cache and sends no request. Gopher gets older posts only when
you come to the end of the list of a creator. It never reads the full history of a creator
automatically. It sends no referrer with a media request, because that prevents HTTP 403 from the
media servers. See request limits.
Read the architecture for the full picture, and principles for what Gopher will not do.
The privacy policy says the same to the user of the product and to the person who examines it for a store. It is a separate page because it is a legal page: a store asks for an address that shows only the policy. That is not a copy of this page. The rule “one file, one truth” stays: this page tells how Gopher operates. That page tells what that means for the data of a person.
The product also shows the trademark statement on screen (components/Disclaimer.tsx), and not
on this page only.
Where to start
- New to the project: install and run it.
- Contributing code: the build and its commands.
- Looking for a decision and its reasoning: the ADR index.
- Looking for what is unfinished right now:
memory.mdat the root of the repository. That file is deliberately not part of this site — it tracks work in progress, not settled fact.