This is a Chrome extension starter project built using the Create React App with TypeScript template. It provides a foundation for building Chrome extensions using modern web technologies and React.
- Basic React Hooks:
useDomEvaluator
: A custom hook for injecting content scripts into web pages, allowing you to interact with and modify web page content.useStorageState
: A custom hook for managing and persisting extension data in the Chrome storage.
-
Clone the repository:
git clone https://github.com/lemehovskiy/chrome-extension-starter.git
-
Navigate to the project directory:
cd chrome-extension-starter
-
Install dependencies:
npm install
-
Build extension:
- For a one-time build:
npm run build
- For development with auto-reloading on changes:
npm run watch
-
Open Google Chrome and go to
chrome://extensions/
. -
Enable "Developer mode" in the top-right corner of the extensions page.
-
Click on the "Load unpacked" button.
-
Select the
build
directory inside your project directory. This will load your extension into Chrome. -
You should now see your extension in the list of installed extensions. You can interact with your extension from there.
-
If you make changes to your extension and want to see those changes reflected in Chrome, follow these steps to reload the extension:
-
Go to chrome://extensions/.
-
Find your extension in the list of installed extensions.
-
Click the "Reload" button located under your extension. This will reload the extension with your latest changes.
This project is licensed under the MIT License - see the LICENSE.md file for details.
If you have any questions or issues, please feel free to open an issue on the GitHub repository.