Revert older Odnoklassniki counter API.
parent
b4b3829c6d
commit
534781298a
|
@ -94,9 +94,23 @@
|
||||||
popupHeight: 330
|
popupHeight: 330
|
||||||
},
|
},
|
||||||
odnoklassniki: {
|
odnoklassniki: {
|
||||||
counterUrl: protocol + '//www.odnoklassniki.ru/dk?st.cmd=shareData&ref={url}&cb=?',
|
counterUrl: 'http://www.odnoklassniki.ru/dk?st.cmd=extLike&ref={url}&uid={index}',
|
||||||
convertNumber: function(data) {
|
counter: function(jsonUrl, deferred) {
|
||||||
return data.count;
|
var options = services.odnoklassniki;
|
||||||
|
if (!options._) {
|
||||||
|
options._ = [];
|
||||||
|
if (!window.ODKL) window.ODKL = {};
|
||||||
|
window.ODKL.updateCount = function(idx, number) {
|
||||||
|
options._[idx].resolve(number);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
var index = options._.length;
|
||||||
|
options._.push(deferred);
|
||||||
|
$.ajax({
|
||||||
|
url: makeUrl(jsonUrl, {index: index}),
|
||||||
|
dataType: 'jsonp'
|
||||||
|
});
|
||||||
},
|
},
|
||||||
popupUrl: protocol + '//www.odnoklassniki.ru/dk?st.cmd=addShare&st._surl={url}',
|
popupUrl: protocol + '//www.odnoklassniki.ru/dk?st.cmd=addShare&st._surl={url}',
|
||||||
popupWidth: 550,
|
popupWidth: 550,
|
||||||
|
|
Loading…
Reference in New Issue