Skip to content

Commit

Permalink
Support for utm_page.
Browse files Browse the repository at this point in the history
  • Loading branch information
irae committed Jun 18, 2011
1 parent 2e5cb68 commit 23a5a5e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions remove_utm_source_url.user.js
@@ -1,12 +1,13 @@
// ==UserScript==
// @name Remove utm_source from URLs
// @name Remove utm_source, utm_pages, etc. from URLs
// @namespace pro.irae.userscripts
// @description Remove seamlessly the long URL from feedburner, making it easy to share and to read tose urls
// @description Remove seamlessly the long URL from analytics, feedburner, etc. making it easy to share and to read tose urls
// @include *utm_source=*
// @include *utm_page=*
// ==/UserScript==

(function() {
var cleanURL = (document.location.href+'').replace(/(\?|&)?utm_source.*/,'');
var cleanURL = (document.location.href+'').replace(/(\?|&)?utm_.*/,'');
if(history && 'replaceState' in history) {
history.replaceState({},'same',cleanURL);
} else {
Expand Down

0 comments on commit 23a5a5e

Please sign in to comment.