// ==UserScript== // @name Vkontakte.ru safe url // @namespace lmrvsk // @description Заменяет некоторые "зловредные" ссылки на прямые. // @include http://vkontakte.ru/* // @include http://vk.com/* // ==/UserScript== var fixlinks = [ "//a[contains(@href, '/away.php?')][contains(@href, 'tumblr.com')]", "//a[contains(@href, '/away.php?')][contains(@href, 'blogspot.com')]", "//a[contains(@href, '/away.php?')][contains(@href, '.tomsk.ru')]", ]; function $x(p, c) { if (!c) c = document; var i, arr = [], xpr = document.evaluate(p, c, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); for (i = 0; item = xpr.snapshotItem(i); i++) arr.push(item); return arr; } fixlinks.forEach( function(xpath) { $x(xpath).forEach( function(item) { var awurl = /(.+)\&h=(.+)/; item.href = item.href.replace(awurl, '$1'); awurl = /http:\/\/(.+)\/away\.php\?to=(.+)/; item.href = decodeURIComponent(item.href.replace(awurl, '$2')); } ) } )
Mozilla add on,User script,Grease Monkey Script, greasemonkey userscripts, updater userscripts mafia wars userscripts mafia wars autoplayer userscripts mafia wars wall userscripts scripts userscripts travian greasemonkey greasemonkey download greasemonkey facebook greasemonkey tutorial greasemonkey youtube greasemonkey travian greasemonkey chrome greasemonkey mafia wars greasemonkey mafia wars autoplayer
Monday, February 7, 2011
Заменяет некоторые "зловредные" ссылки на прямые. ( например tumblr.com )
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment