Yandex surrogate help
Posted: Thu Feb 14, 2013 7:40 pm
Hello!
Sadly, yandex search engine followed google and uses javascript onmousedown redirection to track what links are clicked .
For a search query "test" url is:
http://yandex.ru/yandsearch?text=test&lr=213
http://www.yandex.com/yandsearch?text=test&lr=87
I tried creating/copying from google surrogate this configs:
noscript.surrogate.yalinks.replacement = for each(let et in ['focus','mouseover','mousedown','click'])addEventListener(et,function(e){var a=e.target,href=a.href&&a.getAttribute&&a.getAttribute('href');if(href&&/^(?:http|\/url)/.test(href)&&!a._href){a._href=a.href=a.href.replace(/.*\/url.*[?&](?:url|q)=(http[^&]+).*/,function(a,b)decodeURIComponent(b));do{if(/\brwt\(/.test(a.getAttribute('onmousedown')))a.removeAttribute('onmousedown')}while((a=a.parentElement))}},true)
noscript.surrogate.yalinks.sources = !@^http?://[^/]+yandex\..*/yandsearch
but it didn't worked. Any help solving this problem will be appreciated.
Thanks!
Sadly, yandex search engine followed google and uses javascript onmousedown redirection to track what links are clicked .
For a search query "test" url is:
http://yandex.ru/yandsearch?text=test&lr=213
http://www.yandex.com/yandsearch?text=test&lr=87
I tried creating/copying from google surrogate this configs:
noscript.surrogate.yalinks.replacement = for each(let et in ['focus','mouseover','mousedown','click'])addEventListener(et,function(e){var a=e.target,href=a.href&&a.getAttribute&&a.getAttribute('href');if(href&&/^(?:http|\/url)/.test(href)&&!a._href){a._href=a.href=a.href.replace(/.*\/url.*[?&](?:url|q)=(http[^&]+).*/,function(a,b)decodeURIComponent(b));do{if(/\brwt\(/.test(a.getAttribute('onmousedown')))a.removeAttribute('onmousedown')}while((a=a.parentElement))}},true)
noscript.surrogate.yalinks.sources = !@^http?://[^/]+yandex\..*/yandsearch
but it didn't worked. Any help solving this problem will be appreciated.
Thanks!