我制作了自定义共享按钮,并想为它们添加Pocket count。
如果您在浏览器中打开此链接https://widgets.getpocket.com/v1/button?count=vertical&url=http://google.com,您将看到带有计数器的 Pocket 按钮(例如,URL 是 google .com)。
这是一个简单的html文档:
<html><head>
<link rel="stylesheet" type="text/css" href="https://d7x5nblzs94me.cloudfront.net/v1/c/button.css?v=6">
<script type="text/javascript" src="https://d7x5nblzs94me.cloudfront.net/v1/j/shared.js?v=2"></script>
<style type="text/css"></style></head>
<body>
<div class="widget vertical pocket center">
<a id="btn">
<!--
Please do not scrape this for the Pocket count.
It is not relible for you to use and will likely change.
Contact us at api@getpocket.com for an official API.
Thanks!
-->
<span><em id="cnt">126775</em><i></i><u></u></span>
<b></b>
</a>
</div>
<script type="text/javascript">
var POCKET_DOMAIN = 'getpocket.com';
var iLi = true;
var btnData = {"mode":"viapocketbutton","ct":"b607befed1e75f78567281514cae33db78cbcab9","ctn":"ed82217ee621d17ee56ca091cd836e96149b7921","label":"pocket","count":"vertical","src":"","url":"http:\/\/google.com"};
</script>
<script type="text/javascript" src="https://d7x5nblzs94me.cloudfront.net/v1/j/button.js?v=5"></script>
</body></html>
<em id="cnt">...</em>
如何用jQuery.ajax()
其他东西(js)解析这个Pocket count(放在)?