Disable Google+ counter on HTTPS pages (close #58).
parent
5ed3e956e2
commit
73082c20fb
|
@ -101,7 +101,8 @@ var services = {
|
|||
popupHeight: 360
|
||||
},
|
||||
plusone: {
|
||||
counterUrl: protocol + '//share.yandex.ru/gpp.xml?url={url}',
|
||||
// HTTPS not supported yet: http://clubs.ya.ru/share/1499
|
||||
counterUrl: protocol === 'http:' ? 'http://share.yandex.ru/gpp.xml?url={url}' : undefined,
|
||||
counter: function(jsonUrl, deferred) {
|
||||
var options = services.plusone;
|
||||
if (options._) {
|
||||
|
@ -153,7 +154,7 @@ var counters = {
|
|||
var deferred = $.Deferred();
|
||||
var jsonUrl = options.counterUrl && makeUrl(options.counterUrl, {url: url});
|
||||
|
||||
if ($.isFunction(options.counter)) {
|
||||
if (jsonUrl && $.isFunction(options.counter)) {
|
||||
options.counter(jsonUrl, deferred);
|
||||
}
|
||||
else if (options.counterUrl) {
|
||||
|
|
Loading…
Reference in New Issue