Guest User

Untitled

a guest
Jun 13th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. javascript:(function(){ var transformLinks = function(urls, global) { var links = document.getElementsByTagName('a'); for (var i = 0, link; link = links[i]; i++) { if (link.href.match(global)) { urls.forEach(function(url) { var re = url.match.exec(link.href); if (re) { var newlink = link.href.replace(url.match, url.replace); link.href= newlink; return; }; }); }; }; }; var urls = [ { match: /\/category\.php\?town_name\=([A-Z]+)/, replace: '/index.html' }, { match: /\/sign_in\.php\?indexflag\=([0-9]+)\&town_name\=([A-Z]+)/, replace: '/$2/sign_in/$1.html' }, { match: /\/subcategory_view\.php\?subcart_id\=([0-9]+)\&town_name\=([A-Z]+)/, replace: '/$2/subcategory_view/$1.html' }, { match: /\/re_counter\.php\?id\=([0-9]+)\&town_name\=([A-Z]+)/, replace: '/$2/re_counter/$1.html' }, { match: /\/store_ower\.php\?flag\=([0-9]+)\&town_name\=([A-Z]+)/, replace: '/$2/store_ower/$1.html' }, { match: /\/view_procuct\.php\?item_id\=([0-9]+)\&town_name\=([A-Z]+)/, replace: '/$2/view_procuct/$1.html' }, { match: /\/stores_view\.php\?town_name\=([A-Z]+)\&itemname\=(.*)/, replace: '/$1/stores_view/$2.html' }, { match: /\/{1}(.*)\/{1}(.*)\.php\?town_name\=([A-Z]+)/, replace: '/$3/$2.html' } ]; transformLinks(urls, /local-mart\.com/gi); })();
Add Comment
Please, Sign In to add comment