https://github.com/maxbeizer/oo_json_extension
Make copying optionomega results easier
https://github.com/maxbeizer/oo_json_extension
Last synced: 5 months ago
JSON representation
Make copying optionomega results easier
- Host: GitHub
- URL: https://github.com/maxbeizer/oo_json_extension
- Owner: maxbeizer
- License: mit
- Created: 2025-12-09T22:09:49.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-12-10T22:39:06.000Z (6 months ago)
- Last Synced: 2025-12-11T10:03:37.409Z (6 months ago)
- Language: JavaScript
- Size: 21.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## OptionOmega JSON Overlay Extension
A small helper extension that shows a live JSON snapshot of a backtest for easy copy/paste.
https://github.com/user-attachments/assets/32e0b257-30c5-46c4-806a-38bdcadb7ba8
> [!WARNING]
> This is experimental and best effort. The API is very much under heavy development and there is not a stable version at this time. Use at your own risk.
### Quick start
- Load the folder as an unpacked extension (`chrome://extensions` → Load unpacked → `oo_json_extension`). No build step needed.
- Open `optionomega.com/test/*`. A "LLM JSON" panel pins to the bottom of the page.
- Click **Refresh** to rescan or **Copy** to clipboard.
### What it captures
- `header`: title/tags/link from the top bar.
- `metrics`: `dt`/`dd` card pairs (Underlying, Dates, P/L, trades, fees, etc.).
- `dateRange`: parsed `from`/`to`/`text` when present (dates normalized to ISO 8601 when parseable).
- `labeledValues`: headings paired with short numeric-ish values (fallback capture for two-column cards).
- `lists`: visible `ul`/`ol` items (entry/misc bullets).
- `legs`: each row in the legs table (`side`, `type`, `qty`, `dte`, `legType`, `text`).
- Also includes `url`, `title`, and `scrapedAt` timestamp.
### Using the panel
- Read/Copy: Use **Refresh** then **Copy** to grab the JSON for an LLM or logs.
- Tweak before copy: You can edit the textarea manually; the panel won’t overwrite your edits until you hit **Refresh**.
> Note: Form autofill was removed because the OptionOmega UI renders inputs dynamically; this extension now focuses solely on extracting and copying results.
### Schemas
- Result payload (`content.js` output): `schema/backtest-result.schema.json` (draft-07). Required: `url`, `title`, `scrapedAt`, `header`, `metrics`, `labeledValues`, `lists`, `legs`. Optional: `dateRange` (`from`/`to`/`text` or null; `from`/`to` emitted as ISO 8601 when parseable). Legs include `side`, `type`, `qty`, `dte`, `legType`, `text`.
### Extend or tweak
- Adjust capture heuristics in `content.js` (`extractLabeledValues`, `extractHeadingPairs`, `extractLists`, `extractLegsTable`).
- Prefer stable IDs/selectors in the app for more deterministic results.
### License
MIT