Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

By viewing the source code you can see that the author intends to add a "More Videos" features, but it's currently commented out. http://feross.net/instant/instant.js

I'd personally recommend not finishing this "More Videos" feature. I think the simplicity of just 1 video per search is awesome and creates beautiful serendipity. But, I know such a suggestion is very subjective.



Hi there Andrew, I'm the author. After reading the comments on HN and elsewhere, I'm surprised to see my hack being praised for it's simplicity. If I had more time last night, I would have implemented more features - I have a ton of ideas.

I guess it's good that I didn't. It looks like simplicity won.


Speed it up by not going through your server to get the query suggestions. You can drop the jsonp parameter and just eval the results. Or change the jsonp parameter and include it as a script tag.


I'm now doing everything client-side using JQuery and <script> tags to get around cross-domain XHR limitations. Now Google can't block it. :)


I'm curious: how do you get around crossdomain XHR limitations using <script> tags? Thanks!


<script> tags aren't subject to cross-domain restrictions. Think about it - all those website statistics scripts are hosted on external servers, but their Javascript gets executed just fine. By dynamically inserting <script> tags into the page, you can force Javascript from another domain to execute in your domain.


Got it, thanks. I finally got around to learning JSONP.

JQuery's $.ajax API handles it automatically for you too (if you use the 'jsonp' or 'script' dataType options), which is very nice.


They can block by referer, of which your domain is. Though I doubt they would.


Considering they offered him a job (http://news.ycombinator.com/item?id=1680265), I don't think they'll block it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: