Greasy Fork is available in English.
Get rid of Facebook's fbclid tracking
< Обсуждения Facebook's fbclid Killer
not works for middle click
the code below works for middle click
$(document).on("mousedown",'a', function (e1) { $(document).one("mouseup",'a', function (e2) { if (e1.which == 2 && e1.target == e2.target) { var fbLink = this.href; var index = fbLink.search(/fbclid/); if(index != -1){ event.preventDefault(); var originalLink = fbLink.substring(0, index-1); this.href = originalLink; var e3 = $.event.fix(e2); e3.type = "middleclick"; $(e2.target).trigger(e3); } } }); });
then combine your original code
Войдите, чтобы ответить.
not works for middle click
the code below works for middle click
then combine your original code