This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Referral: your mom | |
// @namespace yourmom | |
// @description This script changes every utm_source variable in links to 'Your mom'. | |
// @include * | |
// ==/UserScript== | |
var links = document.getElementsByTagName('a'); | |
for(var i=0; i<links.length; i++) { | |
links[i].href = links[i].href.replace(/([&|?])utm_source=(.*)([&|?|^])/,"$1utm_source=Your+mom$3"); |