Revert "Add https support to odnoklassniki using yandex as proxy"
This reverts commit b5b02ca883
.
master
parent
c2e2df35c6
commit
115e7db0af
|
@ -95,22 +95,22 @@
|
|||
popupHeight: 330
|
||||
},
|
||||
odnoklassniki: {
|
||||
counterUrl: 'https://share.yandex.net/counter/odnoklassniki/?url={url}',
|
||||
// connect.ok.ru works on mobiles but doesn’t work with HTTPS
|
||||
// www.ok.ru works with HTTPS but redirects to HTML page on mobiles
|
||||
counterUrl: (isHttps ? 'https://www' : 'http://connect') + '.ok.ru/dk?st.cmd=extLike&ref={url}&uid={index}',
|
||||
counter: function(jsonUrl, deferred) {
|
||||
var options = services.odnoklassniki;
|
||||
if (options._) {
|
||||
// Reject all counters except the first because this counter doesn’t neither return URL nor accept callback
|
||||
deferred.reject();
|
||||
return;
|
||||
if (!options._) {
|
||||
options._ = [];
|
||||
if (!window.ODKL) window.ODKL = {};
|
||||
window.ODKL.updateCount = function(idx, number) {
|
||||
options._[idx].resolve(number);
|
||||
};
|
||||
}
|
||||
|
||||
if (!window.ODKL) window.ODKL = {};
|
||||
window.ODKL.updateCount = function(idx, number) {
|
||||
deferred.resolve(number);
|
||||
};
|
||||
|
||||
options._ = deferred;
|
||||
$.getScript(makeUrl(jsonUrl))
|
||||
var index = options._.length;
|
||||
options._.push(deferred);
|
||||
$.getScript(makeUrl(jsonUrl, {index: index}))
|
||||
.fail(deferred.reject);
|
||||
},
|
||||
popupUrl: 'http://connect.ok.ru/dk?st.cmd=WidgetSharePreview&service=odnoklassniki&st.shareUrl={url}',
|
||||
|
|
Loading…
Reference in New Issue