Skip to content

Instantly share code, notes, and snippets.

@ftnk
Created November 27, 2009 21:10
Show Gist options
  • Save ftnk/244240 to your computer and use it in GitHub Desktop.
Save ftnk/244240 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Query Cutter
// @namespace http://www.ftnk.jp/userscripts
// @description Cut '?ref=rss', and so on
// @include http://*
// ==/UserScript==
(function (){
var newUrl = location.href;
// delete rss for Cnet Japan, barks, etc
// delete utm* added by feedburner
// delete feature for YouTube
// for japan.linux.com
newUrl = newUrl.replace(/(\?|\&)((ref=|from=)?rss$|utm.+|feature=player_embedded|topic=[0-9]*)/ig, '');
if ( newUrl != location.href ) location.href = newUrl;
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment