Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
AniPetrosyan authored May 7, 2024
1 parent 7d277e2 commit d235c71
Showing 1 changed file with 40 additions and 3 deletions.
43 changes: 40 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,65 @@ To install TabsOFF, follow these steps:
1. Clone the repository:
```bash
git clone https://github.com/your-username/tabs-off.git
```

2. Navigate to the project directory:
```bash
cd chrome-extension
```

4. Install the necessary packages:
```bash
npm install

```

## Usage
To build the extension, run:

npm run build
```bash
npm run build
```

After building, load the unpacked extension into Chrome through the Extensions menu by enabling Developer mode and selecting 'Load unpacked extension'. Navigate to the build directory and select it.


## Chrome Extension Architecture

This project follows the Manifest V3 architecture for Chrome extensions. Key components of the architecture include:

- `manifest.json`: Defines the extension's metadata, permissions, and script configurations
- `background.js`: Runs in the background and handles events and long-running tasks
- `contentScript.js`: Injected into web pages to interact with the DOM and communicate with the background script **(not used here)**
- Popup window: Displays the extension's user interface when the extension icon is clicked


## Testing

The project includes a comprehensive testing setup using Jest, Sinon, and sinon-chrome. The tests cover various aspects of the extension, including component rendering, user interactions, and mocking of Chrome APIs.

To run the tests:

```bash
npm run test
```

To generate a coverage report:

```bash
npm run coverage
```

## Contributing
Interested in contributing to TabsOFF? We welcome contributions of all forms. Here's how you can help:

1. Fork the repository and clone your fork.
2. Create a new branch for your feature or fix.
3. Submit a pull request with your changes.


## Credits

The initial setup of this project was based on the tutorial by [Harshita Joshi](https://github.com/Harshita-mindfire) on creating a Chrome extension with React and TypeScript. The corresponding Medium article can be found [here](https://medium.com/@tharshita13/creating-a-chrome-extension-with-react-a-step-by-step-guide-47fe9bab24a1).

The project has been extended with additional functionality, testing setup, and documentation. The most difficult part was figuring out the right combination of packages for the testing suite (for instance, I would avoid `jest-chrome`, `mockzilla`, `mockzilla-webextension`, to name but a few).

As a base code was used this repository: https://github.com/CIS-3500/chrome-extension-react-typescript-starter

0 comments on commit d235c71

Please sign in to comment.