📜 ⬆️ ⬇️

Dotjs: execution of local scripts on any site

Dotjs is an extension for Google Chrome (under OS X) that allows you to use scripts from the local ~/.js folder on any site if the script file name matches the site name. For example, when you visit google.com script ~/.js/google.com.js will be automatically executed. Thus, modifying sites is no more difficult than using Firefox / GreaseMonkey.

Extra bonus: ~/.js/default.js will be executed on every request, so universal rules can be added here.

To overcome Chrome’s limitations on running local scripts, Dotjs runs through a local web server. The author of the expansion is defunkt (Chris Vanstrat), the co-founder of Github and the current CEO.

Example
 $ cat ~/.js/github.com.js //   github   $('#header .logo img') .css('width', '100px') .css('margin-top', '-15px') .attr('src', '//bit.ly/ghD24e') 


')
RequirementsInstallation

  git clone http://github.com/defunkt/dotjs
 cd dotjs
 rake install 

The original version of Dotjs is written for Google Chrome, but there are already versions for Firefox and for Safari .

Source: https://habr.com/ru/post/123032/


All Articles