This repo is the source code to the Chrome extension for Timing71, a motorsport live timing and analysis system that runs in a user's browser.
- For feature requests and bug reports relating to the Timing71 site and app, use the @timing71/web repo (this is probably the one you want)
- For feature requests and bug reports relating to analysis data, use the @timing71/common repo
The plugin is a thin layer of code that enables in-browser functionality for code hosted at www.timing71.org, including:
- Access to extended storage/IndexedDB
- Cross-origin communication
- Asynchronous generation of replay files
- Display of "Launch" button on supported timing provider sites
- Extension menu options
Due to run-time restrictions imposed by Chrome's Manifest V3,
the majority of functionality here is in host.js
, which runs via an iframe
injected by injector.js
into the host pages at www.timing71.org
, rather
than as a background service worker. That iframe runs with the permissions of
the Chrome extension so is able to establish connections to timing providers.
Configuration is loaded at runtime from www.timing71.org
and cached in local
storage by config.js
.
The service database is defined in services.js
and contains three tables:
services
: storing the start time and data source for each service (e.g. an instance of a connection to a timing provider for a race event).service_states
: stores every timing screen state for a service. These states are loosely the same as the Common Timing Format states described here, but with additional entries to support various features, including the service manifest.service_analyses
: stores the current analysis state for a service.