Revert "Add https support to gplus using yandex as proxy"

This reverts commit fd885d1e44.

Conflicts:
	src/social-likes.js
master
Artem Sapegin 2015-03-10 11:17:50 +03:00
parent 115e7db0af
commit 1be1381eb6
1 changed files with 22 additions and 5 deletions

View File

@ -118,12 +118,29 @@
popupHeight: 360
},
plusone: {
counterUrl: 'https://share.yandex.net/counter/gpp/?url={url}&callback=?',
convertNumber: function(number) {
if (typeof number === 'string') {
number = number.replace(/\D/g, '');
// 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;
}
return parseInt(number, 10);
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;
$.getScript(makeUrl(jsonUrl))
.fail(deferred.reject);
},
popupUrl: 'https://plus.google.com/share?url={url}',
popupWidth: 700,