Skip to content

Instantly share code, notes, and snippets.

@sathishshan
Last active December 31, 2020 06:40
Show Gist options
  • Save sathishshan/293a82882a66dbba12b3521e3a2ac591 to your computer and use it in GitHub Desktop.
Save sathishshan/293a82882a66dbba12b3521e3a2ac591 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Remove_Params
// @namespace parameter_blocker
// @description Remove any parameter from the url
// @version 1.0
// @include *
// @run-at document-start
// ==/UserScript==
var loc = window.top.location.toString();
if(loc.indexOf('?fbclid')!==-1){
window.top.location.replace(loc.replace(/fbclid([^&#])+/g,''));
} else if (loc.indexOf('&fbclid')!==-1) {
window.top.location.replace(loc.replace(/&fbclid([^&#])+/g,''));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment