-
Notifications
You must be signed in to change notification settings - Fork 2
/
ok.js
23 lines (18 loc) · 575 Bytes
/
ok.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const countFactoryIndexed = require('./core/count-factory-indexed.js');
const hrefFactory = require('./core/href-factory.js');
const shareFactory = require('./core/share-factory.js');
const href = hrefFactory('https://connect.ok.ru/dk?st.cmd=WidgetSharePreview', {
url: 'st.shareUrl',
});
module.exports = shareFactory(href, 580, 350);
const callbacks = [];
window.ODKL = {
updateCount(id, count) {
callbacks[id || 0](Number(count));
},
};
module.exports.count = countFactoryIndexed(
'https://connect.ok.ru/dk?st.cmd=extLike&ref=',
'&uid=',
callbacks
);