nspg

Delete URL Params

Feb 2nd, 2012
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. javascript:(function(){var url=location.href;if(url.match(/^https?:\/\/(www\.)?amazon\.co\.jp/i)){var asin=document.getElementById('ASIN').value;location.href='http://amazon.jp/dp/'+asin;} else if(url.match(/^https?:\/\/(?:www\.)?youtube.com\/watch\?(?:.+&)?(v=[^&]+)(?:&.+)?/i)) {var vid=RegExp.$1;location.href='http://youtube.com/watch?'+vid;} else if(url.match(/^https?:\/\/(?:www\.)google\.(?:co\.jp|com)\/search\?(?:.+&)?(q=[^&]+)(?:&.+)?/i)) {location.href='http://www.google.co.jp/search?'+RegExp.$1;} else {var idx=url.indexOf('?');if(idx!=-1){location.href=url.substring(0,idx);}}})();
Advertisement
Add Comment
Please, Sign In to add comment