-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1 parent
b352269
commit b345843
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Timing71 Beta Chrome extension | ||
|
||
 | ||
 | ||
 | ||
 | ||
|
||
This repo is the source code to the [Chrome extension](https://chrome.google.com/webstore/detail/timing71/pjdcehojcogjpilmeliklfddboeoogpd) | ||
for [Timing71 Beta](https://beta.timing71.org/), a motorsport live timing and | ||
analysis system that runs in a user's browser. | ||
|
||
The plugin is a thin layer of code that enables in-browser functionality for | ||
code hosted at [beta.timing71.org](https://beta.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](https://bugs.chromium.org/p/chromium/issues/detail?id=1152255), | ||
the majority of functionality here is in `host.js`, which runs via an iframe | ||
injected by `injector.js` into the host pages at `beta.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 | ||
|
||
Configuration is loaded at runtime from `beta.timing71.org` and cached in local | ||
storage by `config.js`. | ||
|
||
## Database structure | ||
|
||
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](https://info.timing71.org/reference/state.html), but with additional | ||
entries to support various features, including the [service manifest](https://info.timing71.org/reference/manifest.html). | ||
* `service_analyses`: stores the current analysis state for a service. |