https://github.com/codemonument/chrome-ask-gpt
A simple chrome extension which adds a search provider to the chrome omnibar to capture a search query and insert it into the text-input field of chat.openai.com
https://github.com/codemonument/chrome-ask-gpt
Last synced: over 1 year ago
JSON representation
A simple chrome extension which adds a search provider to the chrome omnibar to capture a search query and insert it into the text-input field of chat.openai.com
- Host: GitHub
- URL: https://github.com/codemonument/chrome-ask-gpt
- Owner: codemonument
- License: mit
- Created: 2023-03-01T10:46:40.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-11T07:30:45.000Z (about 3 years ago)
- Last Synced: 2025-01-25T15:41:25.760Z (over 1 year ago)
- Language: TypeScript
- Size: 758 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.dev.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Developer Readme
> Helpfull stuff for Contributions / Developers
- Chrome V3 Manifest Format: https://developer.chrome.com/docs/extensions/mv3/manifest/
- Chrome Extensions api docs: https://developer.chrome.com/docs/extensions/reference/
## Configuring Rollup in Vite to output multiple entrypoints
Needed for html entrypoints (for example chromes option.html or popup.html),
together with js entrypoints, specifically background.js service worker entrypoint
https://github.com/vitejs/vite/discussions/1736
=> rollup config of vite library mode: https://github.com/vitejs/vite/blob/main/packages/vite/src/node/build.ts#L345-L372
=> Adjust to my own liking - use only rollup options like this:
```
rollupOptions: {
output: {
entryFileNames: `[name].js`,
// deactivates hashes in file names
// chunkFileNames: `[name].js`,
// assetFileNames: `[name].[ext]`,
},
input: {
background: path.resolve("src/background.ts"),
options: path.resolve("./src/pages/options.html"),
popup: path.resolve("./src/pages/popup.html"),
},
},
```
## Inject content script into tab page from a popup.html from your extension
https://levelup.gitconnected.com/how-to-use-a-content-script-with-a-popup-in-your-chrome-extension-f4adb8070d0a