When I put together my new theme, I made it a goal to integrate more of the social bookmarking websites. The benefit to me is that my articles and website will get more attention. The benefit to you is that you can save / bookmark / share my articles easier.
当我整理新主题时,我就将整合更多的社会书签网站作为目标。 对我来说,好处是我的文章和网站将得到更多关注。 给您带来的好处是您可以更轻松地保存/添加书签/共享我的文章。
I've found the most useful bookmarking site to be de.licio.us. De.licio.us provides a very simple API which allows me access information about who has bookmarked my articles quickly. Here's how to pull the bookmark count for a specified URL.
我发现最有用的书签站点是de.licio.us 。 De.licio.us提供了一个非常简单的API,使我可以快速访问有关谁为我的文章添加了书签的信息。 这是提取指定URL书签数量的方法。
You need to place your function code before the second JavaScript tag which goes to de.licio.us to get the statistic information. Note that you need to provide the URL to check and a callback function which will handle the data.
您需要将功能代码放在第二个JavaScript标记之前,该标记位于de.licio.us处,以获取统计信息。 请注意,您需要提供要检查的URL和将处理数据的回调函数。
When you receive the data, you can do whatever you want to format it. On this site, I get the count and append it to the "de.licio.us" link at the top of the article. How would you use this data?
收到数据后,您可以执行任何格式化操作。 在此站点上,我得到了计数并将其附加到文章顶部的“ de.licio.us”链接。 您将如何使用这些数据?
翻译自: https://davidwalsh.name/delicious-url-count-javascript