ardydedase / openpilot-chrome-extension

Shop for cars in autotrader.com, autotrader.ca and curbie.ca knowing which ones are supported by Openpilot.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Openpilot Chrome Extension (Unofficial)

build

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.

Chrome extension icon

Chrome extension on autotrader.ca

Supported websites

The extension currently works the following web pages:

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:

Prerequisites

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

About

Shop for cars in autotrader.com, autotrader.ca and curbie.ca knowing which ones are supported by Openpilot.

License:MIT License


Languages

Language:TypeScript 94.7%Language:JavaScript 2.9%Language:CSS 1.5%Language:HTML 0.8%