3 ms·
Wow, what a brilliant concept. Needs a keyboard shortcut for "give me another one with the same query", though. Then it would be both media bliss and a wonderf
by Entlin 16y ago
Wow, what a brilliant concept.
Needs a keyboard shortcut for "give me another one with the same query", though. Then it would be both media bliss and a wonderful way to chill out.
- andrewparker 16y agoBy 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 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.
- feross 16y agoHi 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.
- what 16y agoSpeed 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.
- feross 16y agoI'm now doing everything client-side using JQuery and <script> tags to get around cross-domain XHR limitations. Now Google can't block it. :)
- djb_hackernews 16y agoThey can block by referer, of which your domain is. Though I doubt they would.
- what 16y agoConsidering they offered him a job (http://news.ycombinator.com/item?id=1680265 http://news.ycombinator.com/item?id=1680265), I don't think they'll block it.
- adityagada 16y agonow a Facebook application on YouTube Instant : http://apps.facebook.com/ytinstant/ http://apps.facebook.com/ytinstant/
- shajith 16y agoI'm curious: how do you get around crossdomain XHR limitations using <script> tags? Thanks!
- feross 16y ago<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.
- shajith 16y agoGot 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.