Live data from Hacker News

Dotjs — hack the web

defunkt.io

11–20 of 66 posts

Re: Dotjs — hack the web

#12
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!

Re: Dotjs — hack the web

#14
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".

Re: Dotjs — hack the web

#15
post #8

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. Bonus points for it being so easy to share, too: https://github.com/holman/holman-js/blob/master/news.ycombin...

Same here. Mine:

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...

Re: Dotjs — hack the web

#16
post #13

Requires Ruby? Why...

Chrome extensions can't access the local filesystem so we have to start a tiny webserver in the background.

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.

Re: Dotjs — hack the web

#17
post #14

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…

That's all true, but dotjs is only for Google Chrome on OS X.

Google Chrome on OS X has no such filesystem-based model for managing scripts.

Re: Dotjs — hack the web

#18
post #13

Requires Ruby? Why...

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.

Re: Dotjs — hack the web

#20
post #13

Requires Ruby? Why...

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.

If you use your own server make sure you set the Access-Control-Allow-Origin header:

https://github.com/defunkt/dotjs/blob/master/bin/djsd#L26

(Also, Ruby comes with OS X (just like Python) so it seemed a sane choice.)

Post reply on HN