-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
42 lines (32 loc) · 1.62 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
~/.js
=====
Dotjs-NH is a simple web extension for Chromium and Firefox that injects
custom scripts and style sheets into the pages directly from user's
~/.js and ~/.css directories based on their file name. It's one of
many replacements for defunkt's popular dotjs extension for Chrome.
Original extension used separate HTTP server which doesn't work well
in presence of Content Security Policy. This one uses native messaging
host to access the files.
Both extension and messaging host are trivial, but configuring it to
work together is rather annoying, which is why this exists to build it
as a Debian package.
Installation
------------
This repository is in DebSrc3 format and you can build it using your
favourite tools and then just install the resulting package.
In Debian stretch, Chromium additionally needs the extension to be
explicitly added with --load-extension flag. In buster, one only
needs to restart the browser as it should be added automatically.
It does not work with Google Chrome.
Usage
-----
Like original dotjs, Dotjs-NH injects files named after domain
visited and all its parent domains. For example when one navigates
to https://example.com/, it will inject files ~/.js/example.com.js and
~/.js/com.js. Additionally ~/.js/default.js is injected to all pages.
Similarly, it will load CSS style sheets from ~/.css/example.com.css,
~/.css/com.css, and ~/.css/default.css.
Internationalized domain names require file names in their punycode form.
Unlike in the original dotjs, no additional libraries are injected.
If compatibility is desired, one may put jQuery in ~/.js/default.js
which is included in all sites.