Openpilot Chrome Extension (Unofficial)
Blog post: Chrome Extension for Openpilot Supported Cars (Unofficial)
Shop for cars in autotrader.com, autotrader.ca, and curbie.ca knowing which ones are supported by Openpilot.
Supported websites
The extension currently works the following web pages:
- autotrader.com/cars-for-sale/all-cars
- autotrader.ca/new e.g. https://www.autotrader.ca/new/hatchback,suv/?srt=1&make=Honda,Hyundai,Toyota
- curbie.ca/cars
Adding a new website to support
If you want to support a new website, e.g. carmarketplace.com. Add a new class CarmarketPlaceCom
that implements the Website interface. Refer to the existing Website interface implementations for details.
Supported cars data source
Supported cars data is from Openpilot's README.
Comma.ai has an API that returns supported vehicle compatibility data. However, it's not as up-to-date as Openpilot's README. I used tableconvert.com to convert this markdown table from Openpilot's README into JSON.
This manual step is not glamorous. However, I could readily assign comma's API response to the compatibleCars
constant if ever I decide to use it in the future.
To update the supported cars JSON:
- Copy the table in markdown format from the Openpilot README
- Convert the table markdown to JSON using tableconvert.com
- Update the
cars
array in supported.ts and community.ts. - Supported car sources:
Prerequisites
- node + npm (Current Version)
Option
Includes the following
- TypeScript
- Webpack
- React
- Jest
- Example Code
- Chrome Storage
- Options Version 2
- content script
- count up badge number
- background
Project Structure
- src/typescript: TypeScript source files
- src/assets: static files
- dist: Chrome Extension directory
- dist/js: Generated JavaScript files
Setup
npm install
Build
npm run build
Build in watch mode
terminal
npm run watch
Visual Studio Code
Run watch mode.
type Ctrl + Shift + B
Load extension to chrome
Load dist
directory
Test
npx jest
or npm run test