Heavily inspired by dotjs, infuser matches and loads JS, CoffeeScript, and CSS files from ~/.infuser
into web pages based on their domain name.
infuser requires Node.js with npm and forever (npm install -g forever
).
To install:
git clone git://github.com/holic/infuser.git
cd infuser
npm install
forever start lib/server.js
- Suppress SSL certificate warning at
https://localhost:3131/google.com.js
- Install the Chrome extension or userscript from infuser's
extension
directory. Navigate to your Chrome extensions and use one of the following:- For the Chrome extension, turn on "Developer mode", click "Load unpacked extension…", and select infuser's
extension
directory. - For the userscript, drag the
infuser.user.js
into the window. The userscript may also be usable in Firefox or Safari, but is untested.
- For the Chrome extension, turn on "Developer mode", click "Load unpacked extension…", and select infuser's
A request to https://www.google.com/
, for example, will compile and load a JS file and a CSS file as listed below.
~/.infuser/_before/*.js
~/.infuser/_before/*.coffee
~/.infuser/_before.js
~/.infuser/_before.coffee
~/.infuser/.com/*.js
~/.infuser/.com/*.coffee
~/.infuser/.com.js
~/.infuser/.com.coffee
~/.infuser/.google.com/*.js
~/.infuser/.google.com/*.coffee
~/.infuser/.google.com.js
~/.infuser/.google.com.coffee
~/.infuser/google.com/*.js
~/.infuser/google.com/*.coffee
~/.infuser/google.com.js
~/.infuser/google.com.coffee
~/.infuser/_after/*.js
~/.infuser/_after/*.coffee
~/.infuser/_after.js
~/.infuser/_after.coffee
~/.infuser/_before/*.css
~/.infuser/_before.css
~/.infuser/.com/*.css
~/.infuser/.com.css
~/.infuser/.google.com/*.css
~/.infuser/.google.com.css
~/.infuser/google.com/*.css
~/.infuser/google.com.css
~/.infuser/_after/*.css
~/.infuser/_after.css
Note: The domain's www.
prefix is ignored. Wildcard matches are sorted by filename.