Skip to content

Instantly share code, notes, and snippets.

@sathishshan
Created January 3, 2021 03:07
Show Gist options
  • Save sathishshan/4eb711bc0ce1e0f178573ab0c44a0251 to your computer and use it in GitHub Desktop.
Save sathishshan/4eb711bc0ce1e0f178573ab0c44a0251 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Remove-UTM-from-URL
// @namespace parameter_blocker
// @description Removes UTM from url (by reloading)
// @version 1.0
// @include https://www.naukri.com/job-listings*
// @run-at document-start
// ==/UserScript==
var loc = window.top.location.toString();
if(loc.indexOf('utm_')!==-1){
window.top.location.replace(loc.replace(/[?&]utm_([^&])+/g,''));
} else if(loc.indexOf('src=')!==-1){
window.top.location.replace(loc.replace(/[&]src([^&])+/g,''));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment