Add https support to gplus using yandex as proxy
Btw, migrate from old api endpoint to new onemaster
parent
4188218acc
commit
fd885d1e44
|
@ -118,26 +118,9 @@
|
||||||
popupHeight: 360
|
popupHeight: 360
|
||||||
},
|
},
|
||||||
plusone: {
|
plusone: {
|
||||||
// HTTPS not supported yet: http://clubs.ya.ru/share/1499
|
counterUrl: 'https://share.yandex.net/counter/gpp/?url={url}&callback=?',
|
||||||
counterUrl: isHttps ? undefined : 'http://share.yandex.ru/gpp.xml?url={url}',
|
convertNumber: function(data) {
|
||||||
counter: function(jsonUrl, deferred) {
|
return parseInt(data, 10);
|
||||||
var options = services.plusone;
|
|
||||||
if (options._) {
|
|
||||||
// Reject all counters except the first because Yandex Share counter doesn’t 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);
|
|
||||||
},
|
},
|
||||||
popupUrl: 'https://plus.google.com/share?url={url}',
|
popupUrl: 'https://plus.google.com/share?url={url}',
|
||||||
popupWidth: 700,
|
popupWidth: 700,
|
||||||
|
|
Loading…
Reference in New Issue