3 ms·
I've written a simple bookmarklet I call UrchinKiller that does the job: javascript:window.location=window.location.href.replace(/\?([^#]*)/,function(_,s){
by BerislavLopac 7y ago
I've written a simple bookmarklet I call UrchinKiller that does the job:
javascript:window.location=window.location.href.replace(/\?([^#]*)/,function(_,s){s=s.split('&').filter(function(v){return(!/^utm_/.test(v))}).join('&');return(s?'?'+s:'')});
- admax88q 7y agoWon't this only apply _after_ you've loaded the page? Doesn't really help prevent the tracking that most of those parameters are used for.
- devindotcom 7y agoCould still be handy for people who don't mind the URL loading big but might later want to copy-paste it somewhere in cleaner format.
- BerislavLopac 7y agoI generally use it just before I trigger the "post to News.YC" bookmarklet. ;-) javascript:window.location=%22http://news.ycombinator.com/submitlink?u=%22+encodeURIComponent(document.location)+%22&t=%22+encodeURIComponent(document.title)