p3lim / dotjs-universal

No longer maintained due to breaking changes in Chrome

Home Page:http://bit.ly/dotjs-universal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

~/.js

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

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

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

jQuery 2.1 is included and you'll be able to use that in your scripts, and, two default files /scripts/default.js and /styles/default.css will load on every page, so you'll have a place to put helper functions, libraries or style sheets in.

By going to the extension options (Settings > Extensions > dotjs universal > Options), you can get the path where your files are located.

Warning

Unlike the original, this version does not run it's own local file server, all the files are located within the extension's own directory instead.

While this lets the extension work as a standalone extension and will work on every operating system, it has one major drawback:

When you update this extension (and by default, Chrome will do that automatically), it will delete all your existing scripts. Because of this, I highly suggest you replace the directories with a symbolic link to a safe place on your drive.

See this document on how to make a symbolic link on for your system.

Example

By adding the following to /scripts/google.com.js

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

You will achieve this result upon every visit to www.google.com

Install

Credits

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

Other versions

Other browsers

About

No longer maintained due to breaking changes in Chrome

http://bit.ly/dotjs-universal

License:MIT License


Languages

Language:JavaScript 71.9%Language:HTML 28.1%