TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Review my Google Buzz jQuery plugin and web service

17 点作者 pufuwozu超过 15 年前

1 comment

simonw超过 15 年前
You appear to be using the cross-domain XHR stuff that's only really supported by very recent browsers. Since you're hosting your own proxy for the script anyway you'd be better off having the proxy convert the XML in to JSON and serving it up using JSON-P so it works reliably cross-domain.<p>Your plugin hard-codes the HTML that's used to display the buzzes. While that's convenient, it's also inflexible. I would suggest splitting the logic up in to two parts - one that gets the recent buzzes and turns them in to JavaScript data structures, and one that takes those data structures and formats them as HTML. That way people who want to do their own processing / formatting of the Buzz data can still use the first half of your plugin.