NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name Split fbclid // @author DungGramer // @version 1.2 // @description Split fbclid when open link from facebook // @homepage https://github.com/DungGramer/split-fbclid // @icon https://raw.githubusercontent.com/DungGramer/skip-fbclid/main/icon.png // @include /((&fbclid=\w+)|(fbclid=\w+))(-\w+|)/ // @license CC-BY-SA-3.0; http://creativecommons.org/licenses/by-sa/3.0/ // @license MIT // @grant none // @copyright 2020, DungGramer (https://openuserjs.org/users/DungGramer) // @downloadURL https://openuserjs.org/install/DungGramer/Split_fbclid.user.js // @updateURL https://openuserjs.org/meta/DungGramer/Split_fbclid.meta.js // ==/UserScript== (function() { let newURL = window.location.href.split(/((&fbclid=\w+)|(fbclid=\w+))(-\w+|)/); let newHref = newURL[0].match(/\?\w+/) != null ? newURL[0] : newURL[0].split(/\?/)[0]; if(newURL[newURL.length - 1].match(/-\w+/) != null) { history.replaceState(null, '', newHref); } else { history.replaceState(null, '', newHref + newURL[newURL.length - 1]); } })();