<commit_before># night-mode-js

A small javascript tool to automatically add or remove night css class from the `<body>` element. It's lightweight, straightforward and easy to set up. This project was designed with conviction that all software should have a dark theme to reduce eye strain during night-time use.

## Quickstart
Download and place night-mode.min.js in your project. Simply include the script in the `<head>`.
```html
<script src="path/to/night-mode.min.js">
```

The simplest way to use NightMode (See the table below describing default options):
```html
<script>
	var nightMode = new NightMode();
</script>
```

Or with custom options:
```html
<script>
	var nightMode = new NightMode({
    	evening: new DayTime(22, 0), // or evening: DayTime.fromString('22:00')
        morning: new DayTime(5, 30), // or morning: DayTime.fromString('5:30')
        refreshIntervalInSeconds: 30
        ...
    });
</script>
```
### Options

| property                 | default            | description                                                                   |
|--------------------------|--------------------|-------------------------------------------------------------------------------|<commit_msg>Add cnd link<commit_after># night-mode-js

A small javascript tool to automatically add or remove night css class from the `<body>` element. It's lightweight, straightforward and easy to set up. This project was designed with conviction that all software should have a dark theme to reduce eye strain during night-time use.

## Quickstart
 Simply include the script in the `<head>`.
```html
<script src="https://cdn.jsdelivr.net/night-mode-js/1.0.0/night-mode.min.js">
```

Or download and place night-mode.min.js in your project.
```html
<script src="path/to/night-mode.min.js">
```


The simplest way to use NightMode (See the table below describing default options):
```html
<script>
	var nightMode = new NightMode();
</script>
```

Or with custom options:
```html
<script>
	var nightMode = new NightMode({
    	evening: new DayTime(22, 0), // or evening: DayTime.fromString('22:00')
        morning: new DayTime(5, 30), // or morning: DayTime.fromString('5:30')
        refreshIntervalInSeconds: 30
        ...
    });
</script>
```
### Options

| property                 | default            | description                                                                   |
|--------------------------|--------------------|-------------------------------------------------------------------------------|
{'fraction_non_alphanumeric': 0.20610384462940942, 'fraction_numerical': 0.013079667063020214, 'mean_word_length': 1.9451575262543757, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 18, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3446233', 'n_tokens_mistral': 664, 'n_tokens_neox': 610, 'n_words': 238}