This seems like it's a lot of overhead for what amounts, in terms of capability, to a reimplementation of greasemonkey. It also makes you implement finer controls on execution by url yourself, whereas greasemonkey has them in its syntax. The author states,
"GreaseMonkey user scripts are great, but you need to publish them somewhere and re-publish after making modifications. With dotjs, just add or edit files in ~/.js."
but this caveat is just as strong for files you maintain outside of your browser, and some browsers' implementations of userscripts/greasemonkeylikes actually have a similar filesystem-based model for managing scripts already.
While respectable, I had hoped to be more impressed by a tool that beckons me to "hack the web".
I've sneakily been using this for months on Hacker News itself- I just .hide() stories past around story #15. More signal, less noise. And it's just jQuery, so it's really easy to whip up.
It's interesting how perspectives differ on what is considered noise. On the average day I start my browsing here around link 15, or even the new queue.
You're pretty much guaranteed to hear of anything hitting the front page anyway if it was meaningful to begin with. If not, it's probably some momentary obsession or buzzword bingo (say, "Google", "Social", "Facebook killer", "Privacy", "Product launch" to take an ephemeral example :))
I quickly scan
http://hckrnews.com/
which makes sure I don't miss any upvoted story. It does have a lot of noise, but going through 20 or so articles since last time i looked doesn't take that long
"GreaseMonkey user scripts are great, but you need to publish them somewhere and re-publish after making modifications."
Publish them where? I don't understand this. Whenever I change a user.js file and save it the browser updates it and it's ready to go next time the page reloads.
It looks like Ruby is only needed for the file server. You could easily substitute a Python file server (cd .js; python -m SimpleHTTPServer 3131). You could use a remote Apache server for synchronizing your scripts. I agree that Ruby is a little overkill, but it is simple enough to run easily on a Mac, and it is extensible for hackers.
See also jsshell[1] for Chrome. Press the button and you can run jQuery-powered JS on the fly, save snippets and run them, even automatically on regex-matched URLs.
I'm waiting for someone to build a social browser extension on top of something like this. Anyone could submit custom CSS/JS for a website and the most upvoted "theme" automatically gets loaded. Sure the JS security issues might be a nightmare, but the web would look soooo much prettier!
Great work! But I had some trouble getting it to run on my Mac.
I think it might be because I use VirtualHostX - http://clickontyler.com/virtualhostx/ - which alters my hosts file. I had to create a host - http://dotjs/ - pointing to my ~/.js/ folder - then edit the Extension JS to point the Ajax to http://dotjs/ instead of http://localhost:3131. A bit of pain but it might just be who this affects.
it will look for the js file in the extension directory instead of the local ruby web server, and this should work for any platform. To take the ~/.js convenience, a symlink in *inx system or shortcut in window will do the job.
[+] [-] gue5t|14 years ago|reply
"GreaseMonkey user scripts are great, but you need to publish them somewhere and re-publish after making modifications. With dotjs, just add or edit files in ~/.js."
but this caveat is just as strong for files you maintain outside of your browser, and some browsers' implementations of userscripts/greasemonkeylikes actually have a similar filesystem-based model for managing scripts already.
While respectable, I had hoped to be more impressed by a tool that beckons me to "hack the web".
[+] [-] defunkt|14 years ago|reply
Google Chrome on OS X has no such filesystem-based model for managing scripts.
[+] [-] seanp2k|14 years ago|reply
This project is a lot of work for zero benefit.
[+] [-] rpearl|14 years ago|reply
And Safari: https://github.com/wfarr/dotjs.safariextension
[+] [-] holman|14 years ago|reply
Bonus points for it being so easy to share, too: https://github.com/holman/holman-js/blob/master/news.ycombin...
[+] [-] forgotusername|14 years ago|reply
You're pretty much guaranteed to hear of anything hitting the front page anyway if it was meaningful to begin with. If not, it's probably some momentary obsession or buzzword bingo (say, "Google", "Social", "Facebook killer", "Privacy", "Product launch" to take an ephemeral example :))
[+] [-] sant0sk1|14 years ago|reply
1) sniffs out urls in submissions and auto-links them
2) adds comment thread folding.
https://github.com/sant0sk1/dotfiles/blob/master/js/news.yco...
[+] [-] yread|14 years ago|reply
[+] [-] mph|14 years ago|reply
just change your file extension from .js to .coffee
https://github.com/eightbitraptor/dotjs/commit/20c97774eb29f...
[+] [-] omaranto|14 years ago|reply
[+] [-] TheMiddleMan|14 years ago|reply
Publish them where? I don't understand this. Whenever I change a user.js file and save it the browser updates it and it's ready to go next time the page reloads.
Side node: Scriptish is a fork of greasemonkey with many cool extras. https://addons.mozilla.org/en-US/firefox/addon/scriptish/
[+] [-] reustle|14 years ago|reply
[+] [-] defunkt|14 years ago|reply
If someone knows a way around this limitation, or a simpler webserver to require / embed, I would be thrilled. But so far this is the best I've found.
[+] [-] mgurlitz|14 years ago|reply
[+] [-] tung|14 years ago|reply
[1] https://chrome.google.com/webstore/detail/kmgmkbicahmbceidoi...
[+] [-] oldgregg|14 years ago|reply
[+] [-] mburns|14 years ago|reply
[+] [-] JackWebbHeller|14 years ago|reply
I think it might be because I use VirtualHostX - http://clickontyler.com/virtualhostx/ - which alters my hosts file. I had to create a host - http://dotjs/ - pointing to my ~/.js/ folder - then edit the Extension JS to point the Ajax to http://dotjs/ instead of http://localhost:3131. A bit of pain but it might just be who this affects.
[+] [-] jasonkit|14 years ago|reply
$.get(chrome.extension.getURL("script/"+window.location.hostname+".js"), function(script){ eval(script); });
it will look for the js file in the extension directory instead of the local ruby web server, and this should work for any platform. To take the ~/.js convenience, a symlink in *inx system or shortcut in window will do the job.
[+] [-] sim0n|14 years ago|reply
[+] [-] __rkaup__|14 years ago|reply
[+] [-] rpearl|14 years ago|reply
(Firefox user here... This looks like a poor man's greasemonkey).
[+] [-] unknown|14 years ago|reply
[deleted]
[+] [-] unknown|14 years ago|reply
[deleted]
[+] [-] Sym3tri|14 years ago|reply
It's free in the Chrome store: http://goo.gl/vWcqr
[+] [-] DanielRibeiro|14 years ago|reply
[+] [-] cleverjake|14 years ago|reply
[+] [-] blago|14 years ago|reply
[+] [-] unknown|14 years ago|reply
[deleted]
[+] [-] antihero|14 years ago|reply
[+] [-] pavel_lishin|14 years ago|reply