- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
function (post, hash) {
if (!vk.id || cur.viewAsBox) return;
var icon = ge('like_icon' + post),
my = hasClass(icon, hasClass(icon, 'fw_like_icon') ? 'fw_my_like' : 'my_like'),
matches = post.match(/(-?\d+)(_?)(photo|video|note|topic|wall_reply|note_reply|photo_comment|video_comment|topic_post|)(\d+)/),
like_obj = (matches[3] || 'wall') + matches[1] + '_' + matches[4],
ref = cur.wallType ? (cur.wallType == 'feed' ? 'feed_' + cur.section : ('wall_' + (cur.onepost ? 'one' : (!(cur.wallType || '').indexOf('full_') ? 'full' : 'page')))) : cur.module;
ajax.post('like.php', {act: 'a_do_' + (my ? 'un' : '') + 'like', 'object': like_obj, hash: hash, wall: 1, from: ref}, {
onDone: wall.likeUpdate.pbind(post, !my)
});
var count = val(ge('like_real_count_wall' + post) || ge('like_count' + post));
wall.likeUpdate(post, !my, intval(count) + (my ? -1 : 1));
if (cur.onWallLike) {
cur.onWallLike();
}
}
Зачем посоны из контакта пишут такой говно-код? Куда смотрит Паша?
tirinox 04.05.2012 20:33 # −1
lucidfoxGovno 04.05.2012 20:36 # −1
guest 04.05.2012 21:37 # +6
psycho-coder 04.05.2012 23:20 # 0