<commit_before># BleachCSS - Probe - Reliable unused CSS Detection and Removal

The BleachCSS Probe is the official browser JavaScript client for [BleachCSS](https://www.bleachcss.com).

## What does it do?

The Probe tracks the list of css selectors used in the application and sends it to the BleachCSS servers. Even after a page loads, the Probe watches for DOM mutations to detect newly used selectors. As a result, BleachCSS can confidently detect and remove unused CSS in static websites, CMS systems, Single Page Applications (SPA), and traditional server-rendered dynamic content, no matter what framework is used.

## How does it work?

The Probe's activity can be divided into 5 logical groups:

- **Detect the list of CSS files used on the page**. If any new file gets used during the session, it needs to be detected and processed.
- **Extract the list of selectors from the stylesheets**.
- **Detect page modifications**. This must be done without conflicting with other application code.
- **Efficiently detect used selector**. With as little overhead as possible, to not slowdown the application.
- **Report to the server**. The combination of many client reports over time can give an accurate and trustworthy analysis.

## How do I install the Probe?

```HTML
<script src="https://cdn.bleachcss.com/probe/latest.js"></script>
<script>
    BleachCSS.start({key: 'YOUR_KEY'});
</script>
```

Note: You need to generate a key on [BleachCSS](https://www.bleachcss.com) to use its server.

## API

### start

Configure and start a new instance of BleachCSS.

```javascript
    BleachCSS.start(options);<commit_msg>A couple more minor rewordings<commit_after># BleachCSS - Probe - Reliable unused CSS Detection and Removal

The BleachCSS Probe is the official browser JavaScript client for [BleachCSS](https://www.bleachcss.com).

## What does it do?

The Probe tracks the list of css selectors used in the application and sends it to the BleachCSS servers. Even after a page loads, the Probe watches for DOM mutations to detect newly used selectors. As a result, BleachCSS can confidently detect and remove unused CSS in static websites, CMS systems, Single Page Applications (SPA), and traditional server-rendered dynamic content, no matter what framework is used.

## How does it work?

The Probe's activity can be divided into 5 logical groups:

- **Find CSS files used on the page**. If a new file gets used during the session, it needs to be detected and processed.
- **Extract selectors from the stylesheets**.
- **Detect page modifications**. This must be done without conflicting with other application code.
- **Efficiently detect used selector**. With as little overhead as possible, to not slowdown the application.
- **Report to the server**. The combination of many client reports over time can give an accurate and trustworthy analysis.

## How do I install the Probe?

```HTML
<script src="https://cdn.bleachcss.com/probe/latest.js"></script>
<script>
    BleachCSS.start({key: 'YOUR_KEY'});
</script>
```

Note: You need to generate a key on [BleachCSS](https://www.bleachcss.com) to use its server.

## API

### start

Configure and start a new instance of BleachCSS.

```javascript
    BleachCSS.start(options);
{'fraction_non_alphanumeric': 0.08330762110459734, 'fraction_numerical': 0.000617093489663684, 'mean_word_length': 4.4487394957983195, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3645343', 'n_tokens_mistral': 894, 'n_tokens_neox': 850, 'n_words': 443}