Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Chromium - ~/.js

branch: master

This branch is 0 commits ahead and 0 commits behind master

Octocat-spinner-32 images Restructure April 09, 2014
Octocat-spinner-32 scripts Restructure April 09, 2014
Octocat-spinner-32 styles Make sure the directory is created April 09, 2014
Octocat-spinner-32 LICENSE Update license April 09, 2014
Octocat-spinner-32 README.md Google keep changing their markup :/ April 12, 2014
Octocat-spinner-32 dotjs.js Restructure April 09, 2014
Octocat-spinner-32 jquery.js Restructure April 09, 2014
Octocat-spinner-32 manifest.json Update version April 09, 2014
Octocat-spinner-32 options.html Add a quick link to the styles as well April 09, 2014
Octocat-spinner-32 options.js
README.md

~/.js

dotjs-universal is a Chrome/Chromium browser extension that executes JavaScript and CSS files on websites based on their filename.

Unlike the original, this version does not run it's own local fileserver, all the files are located within the extension's own directory instead, so it'll work on any system!

If you navigate to www.google.com, dotjs will execute /scripts/google.com.js and/or /styles/google.com.css if either of the files exist.

This makes it super easy to spruce up your favorite pages using JavaScript or CSS.

Bonus: All files have jQuery 2.1 loaded, regardless of whether the site you're hacking uses jQuery.

Double bonus: /scripts/default.js is loaded on every site, meaning you can stick plugins or helper functions in it.

Triple bonus: By going to the extension options you will be presented by the absolute path to the scripts and styles directory.

Example

// swap google logo with trollface
$('#hplogo').css({
    background: 'url(//bit.ly/ghD24e) no-repeat',
    backgroundSize: 'auto 95px'
});

Install

Credits

"I almost wish you could just stick JavaScript in ~/.js. Do you know what I'm saying?"

Other versions

Other browsers

Something went wrong with that request. Please try again.