Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// vim:ts=2:sw=2:et
if (window.URL) {
registerPlugin({
newMessageElement: function (elem) {
var keys = [
'fbclid',
'utm_source',
'utm_medium',
'utm_campaign',
'utm_term',
'utm_content',
];
Array.prototype.forEach.call(
elem.querySelectorAll('.status a.link'),
function (a) {
var url = new URL(a.href);
keys.forEach(function (key) {
url.searchParams.delete(key);
});
a.href = url.toString();
}
);
},
});
}
@watagashi
Copy link
Author

watagashi commented May 3, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment