Google+ counter

master
Slava 2015-12-17 11:17:40 +02:00
parent ded5bd4e00
commit 959fc76406
1 changed files with 11 additions and 2 deletions

View File

@ -134,8 +134,17 @@
};
options._ = deferred;
$.getScript(makeUrl(jsonUrl))
.fail(deferred.reject);
$.ajax({
url: makeUrl(jsonUrl),
dataType: 'jsonp',
success: function(number){
if (typeof number === 'string') {
number = number.replace(/\D/g, '');
}
options._.resolve(parseInt(number, 10));
}
})
.fail(deferred.reject);
},
popupUrl: 'https://plus.google.com/share?url={url}',
popupWidth: 700,