Add https support to gplus using yandex as proxy

Btw, migrate from old api endpoint to new one
master
im-denisenko 2015-02-12 20:24:00 +03:00
parent 4188218acc
commit fd885d1e44
1 changed files with 3 additions and 20 deletions

View File

@ -118,26 +118,9 @@
popupHeight: 360
},
plusone: {
// HTTPS not supported yet: http://clubs.ya.ru/share/1499
counterUrl: isHttps ? undefined : 'http://share.yandex.ru/gpp.xml?url={url}',
counter: function(jsonUrl, deferred) {
var options = services.plusone;
if (options._) {
// Reject all counters except the first because Yandex Share counter doesnt return URL
deferred.reject();
return;
}
if (!window.services) window.services = {};
window.services.gplus = {
cb: function(number) {
options._.resolve(number);
}
};
options._ = deferred;
$.getScript(makeUrl(jsonUrl))
.fail(deferred.reject);
counterUrl: 'https://share.yandex.net/counter/gpp/?url={url}&callback=?',
convertNumber: function(data) {
return parseInt(data, 10);
},
popupUrl: 'https://plus.google.com/share?url={url}',
popupWidth: 700,