{"vk":{"useimg":1,"link":"^(?:m\\.)?vk\\.com/photo([\\d\\-_]+)(?:\\?(tag)=(\\d+))?.*","url":": 'vk.com/al_photos.php :list=' + ($[3] ? $[2]+$[3] (this.node.parentNode.getAttribute('onclick')+'').match(/wall-[\\d_]+/)||'')+'')+'&act=show&al=1&photo='+$[1]","res":":\nvar m = /[\\-\\d_]+/, img, ret = null, cache = {'_arr': []}, i, pid = $.url[1].substr($.url[1].lastIndexOf('=') + 1), x = JSON.parse($._.substring($._.indexOf('['), $._.lastIndexOf(']<!><!json>') + 1));\nfor (i in x) {\n ret = x[i].w_src ? ['#' + x[i].w_src] : [];\n ret.push(x[i].z_src || x[i].y_src || x[i].x_src);\n if (x[i].id == pid) { img = [[ret]] }\n else { cache[x[i].id] = ret; cache._arr.push('a[href^=\"/photo'+x[i].id+'\"]') }\n}\ncache._arr.length && [].forEach.call(document.body.querySelectorAll(cache._arr.join(',')), function(node) {\nvar x = cache[node.pathname.match(m)[0]];\nif (!node.IMGS_c) {\n node.IMGS_c_resolved = x;\n node.firstElementChild && (node.firstElementChild.IMGS_c_resolved = x);\n}\n});\nreturn img;","img":"^(?:cs\\d+|pp|sun[\\-0-9]+)\\.(?:userapi\\.com|vk\\.me)/(c\\d+/)*[uv]\\d+/.+","to":":\nvar x = this.node,p=x&&x.parentNode; $=$[0]\nif (x.dataset.src_big) $ = x.dataset.src_big.split('|')[0]\nelse if (x) {\n if (p && p.href && x.classList.contains('page_doc_photo')) $ = p.href + '&wnd=1';\n else if ((x=x.getAttribute('onclick')||p.getAttribute('onclick')) && (x=x.match(/\\{\"?base\"?:[^\\}]+\\}/))) {\n x = JSON.parse(x[0].replace(/\"?\\b(base|[wxyz])_?\"?:/g, '\"$1\":').replace(/(\\[|(,[\\d,]+)?\\])/g, ''));\n var f = (x.z || x.y || x.x).match(/^[a-z]+:\\/\\//i);\n $ = ((!f && x.w) ? '#' + x.base + x.w + '.jpg\\n' : '') + (f ? '' : x.base) + (x.z || x.y || x.x) + '.jpg';\n }\n}\nreturn $"}} |