Merge pull request #167 from scream4ik/master

Fix Google+ counter.
master
Artem Sapegin 2015-12-21 08:30:15 +01:00
commit 2e42befd36
1 changed files with 11 additions and 12 deletions

View File

@ -123,19 +123,18 @@
return; return;
} }
if (!window.services) window.services = {};
window.services.gplus = {
cb: function(number) {
if (typeof number === 'string') {
number = number.replace(/\D/g, '');
}
options._.resolve(parseInt(number, 10));
}
};
options._ = deferred; options._ = deferred;
$.getScript(makeUrl(jsonUrl)) $.ajax({
.fail(deferred.reject); 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}', popupUrl: 'https://plus.google.com/share?url={url}',
popupWidth: 700, popupWidth: 700,