If you love customizing pages on the web using user scripts, here is an alternative for GreaseMonkey. DotJs is a Google Chrome extension that executes JavaScript files in ~/.js
based on their filename. To customize http://www.google.com/
, you will have to create the userscript ~/.js/google.com.js
. The author originally built this for Chrome only but was later ported to other browsers Firefox, Safari and Fluid. Currently, it works **only on OSX**.
How to install?
Installation requires you to have Ruby 1.8 and rake installed. Follow the instructions below to install DotJs.
git clone http://github.com/defunkt/dotjs
cd dotjs
rake install
How does it work?
There is a security restriction in Chrome which prevents access to the local file system. To overcome this problem, DotJs runs a tiny web server on port 3131 which serves the files from ~/.js. Hence, the need for Ruby.
Is it better than GreaseMonkey?
DotJs is just an alternative technique which offers the same functionalities as GreaseMonkey offers. The userscripts in DotJs will not be able to use the GM_ functions which means not all your GM scripts will work directly here. However, you can implement the GM_ methods and make all the GM scripts compatible here. The userscripts in DotJs will have jQuery 1.6 loaded regardless of whether the site you're hacking uses jQuery. Also, it adds support for additional plug-ins and other helper functions.
-- Varun
No comments:
Post a Comment