4 ms·
While the envolve plugin is extremely interesting, the HN implementation would probably be far more useful if you scraped the HN username for logged-in users an
by noelsequeira 15y ago
While the envolve plugin is extremely interesting, the HN implementation would probably be far more useful if you scraped the HN username for logged-in users and displayed it. Anonymity seems to kill the utility of chat. For those that wish to participate anonymously, you can always offer the option to opt out.
Using jQuery, this should be trivial:
$(".pagetop").children('a[href*="user?id="]').attr("href").split('=')[1];
- mayop100 15y agoWe have a full API for doing single sign on. Bug PG and maybe we'll get it up on HN for all to see with account integration.
- deno 15y agoYou can't do that. Though it seems like the sites are composed, they are in fact just embedded viewports (iframe). The only way to scrape username, at the moment, is to turn that app into a plugin/bookmarklet, or at least bootstrap from one. EDIT: Or API/embedded script, but that of course requires the cooperation of site's owner.
- Xk 15y agoThe current implementation uses an iframe and so they can't read the data out of the iframe (same-origin policy). This would require injecting javascript on to news.ycombinator.com. It wouldn't be so bad, but it would require user interaction to do that. If it requires user interaction then it'll be less used. Granted, they could make an extension which does that -- but now you have to download something just to use chat. That's a big barrier to entry.