Skip to content

Commit 569d8a8

Browse files
committed
Document current extension capabilities
1 parent ee8a679 commit 569d8a8

File tree

1 file changed

+20
-27
lines changed

1 file changed

+20
-27
lines changed

README.md

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,37 @@
11
# coderchart
22

3-
> a chrome extension tools built with Vite + React, and Manifest v3
3+
Chrome extension that renders Mermaid diagrams inline wherever ChatGPT (or another whitelisted site) shows a Mermaid code fence. Built with Vite, React, and Manifest V3.
44

5-
## Installing
5+
## Features
66

7-
1. Check if your `Node.js` version is >= **14**.
8-
2. Change or configurate the name of your extension on `src/manifest`.
9-
3. Run `npm install` to install the dependencies.
7+
- Auto-detects Mermaid snippets on supported pages and renders them beneath the original code block.
8+
- Handles live chat updates via a MutationObserver and avoids duplicate work with lightweight bookkeeping.
9+
- Resilient error messaging when Mermaid parsing fails.
10+
- Options page to toggle auto-rendering and manage the site whitelist powered by `chrome.storage.sync`.
11+
- Download rendered diagrams as SVG or PNG straight from the inline toolbar.
1012

11-
## Developing
13+
## Getting Started
1214

13-
run the command
14-
15-
```shell
16-
$ cd coderchart
17-
18-
$ npm run dev
15+
```bash
16+
pnpm install
17+
pnpm dev
1918
```
2019

21-
### Chrome Extension Developer Mode
22-
23-
1. set your Chrome browser 'Developer mode' up
24-
2. click 'Load unpacked', and select `coderchart/build` folder
25-
26-
### Nomal FrontEnd Developer Mode
20+
The dev server pipes hot reloads into the extension. Load the unpacked folder shown in the terminal (usually `dist`) via Chrome's Extensions page while Developer Mode is enabled.
2721

28-
1. access `http://0.0.0.0:3000/`
29-
2. when debugging popup page, open `http://0.0.0.0:3000//popup.html`
30-
3. when debugging options page, open `http://0.0.0.0:3000//options.html`
22+
### Options & Settings
3123

32-
## Packing
24+
- Open `options.html` during development (served at `http://localhost:5173/options.html`) to manage the whitelist or disable auto rendering.
25+
- Saved settings sync across Chrome instances via `chrome.storage.sync`.
3326

34-
After the development of your extension run the command
27+
## Building
3528

36-
```shell
37-
$ npm run build
29+
```bash
30+
pnpm run build
3831
```
3932

40-
Now, the content of `build` folder will be the extension ready to be submitted to the Chrome Web Store. Just take a look at the [official guide](https://developer.chrome.com/webstore/publish) to more infos about publishing.
33+
The production bundle lands in `dist/`. Package it manually or use `pnpm run zip` for a distributable archive.
4134

4235
---
4336

44-
Generated by [create-chrome-ext](https://github.com/guocaoyi/create-chrome-ext)
37+
Bootstrapped with [create-chrome-ext](https://github.com/guocaoyi/create-chrome-ext)

0 commit comments

Comments
 (0)