<commit_before># [![Chrome dotfiles](https://raw.githubusercontent.com/diffsky/chromedotfiles/master/icon-64.png)](https://github.com/diffsky/chromedotfiles) Chrome dofiles

Google Chrome Browser Extension to inject per hostname js and css into tabs.

An alternative to [dotjs](https://github.com/defunkt/dotjs), Chrome dotfiles doesn't
require a webserver and can inject both js and css.

## Install

In the future this might get added to the Chrome Web Store, but for now it's easier to
add the extension in "developer mode".

- Clone this repo.
- Open google chrome to [chrome://extensions/](chrome://extensions/)
- Make sure "developer mode" is selected in the top right
- Click "Load unpacked extension..."
- Browse to the location of the clone repo, click "select"

If all goes well you should see something like:

![Chrome dotfiles](https://raw.githubusercontent.com/diffsky/chromedotfiles/master/assets/extensions.jpg)

Lastly, you will need to create the directory that will contain the js and css that
you want injected. In the root of the repo, create a directory named `chromedotfiles`.
Note that `chromedotfiles` can be a symlink if you prefer.

## Usage

Inside of the `chromedotfiles` directory add javascript and css files that you want run, per domain.
The names of the files should match the hostname of the site you want them to run on, plus
the file extension.

For example, to run files on google.com, you would create:

`www.google.com.js`
```
console.log('hello from chrome dotfiles');
```

`www.google.com.css`
```
body.hp {
  background: #F00;
}
```

Which should result in:

![google](https://raw.githubusercontent.com/diffsky/chromedotfiles/master/assets/example.jpg)


---

Chrome dotfiles logo designed by [<NAME>](http://thenounproject.com/daniel.g.hickey) from the [Noun Project](http://thenounproject.com/) :: Creative Commons – Attribution (CC BY 3.0)<commit_msg>add note about differences to dotjs<commit_after># [![Chrome dotfiles](https://raw.githubusercontent.com/diffsky/chromedotfiles/master/icon-64.png)](https://github.com/diffsky/chromedotfiles) Chrome dofiles

Google Chrome Browser Extension to inject per hostname js and css into tabs.

An alternative to [dotjs](https://github.com/defunkt/dotjs), Chrome dotfiles doesn't
require a webserver and can inject both js and css.

## Install

In the future this might get added to the Chrome Web Store, but for now it's easier to
add the extension in "developer mode".

- Clone this repo.
- Open google chrome to [chrome://extensions/](chrome://extensions/)
- Make sure "developer mode" is selected in the top right
- Click "Load unpacked extension..."
- Browse to the location of the clone repo, click "select"

If all goes well you should see something like:

![Chrome dotfiles](https://raw.githubusercontent.com/diffsky/chromedotfiles/master/assets/extensions.jpg)

Lastly, you will need to create the directory that will contain the js and css that
you want injected. In the root of the repo, create a directory named `chromedotfiles`.
Note that `chromedotfiles` can be a symlink if you prefer.

## Usage

Inside of the `chromedotfiles` directory add javascript and css files that you want run, per domain.
The names of the files should match the hostname of the site you want them to run on, plus
the file extension.

For example, to run files on google.com, you would create:

`www.google.com.js`
```
console.log('hello from chrome dotfiles');
```

`www.google.com.css`
```
body.hp {
  background: #F00;
}
```

Which should result in:

![google](https://raw.githubusercontent.com/diffsky/chromedotfiles/master/assets/example.jpg)


### Differences from [dotjs](https://github.com/defunkt/dotjs)

- loads css as well as javascript
- css and js are injected into the page via the [tabs api](https://developer.chrome.com/extensions/tabs), no ajax calls and script evaluation is made
- jquery is not inserted anywhere


---

Chrome dotfiles logo designed by [<NAME>](http://thenounproject.com/daniel.g.hickey) from the [Noun Project](http://thenounproject.com/) :: Creative Commons – Attribution (CC BY 3.0)
{'fraction_non_alphanumeric': 0.10395314787701318, 'fraction_numerical': 0.0029282576866764276, 'mean_word_length': 4.4872824631860775, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 12, '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': '3154567', 'n_tokens_mistral': 1245, 'n_tokens_neox': 1173, 'n_words': 484}