Skip to content

Instantly share code, notes, and snippets.

@trey
Last active February 27, 2021 20:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trey/ff975086c55aec0fe1a04e30b456813d to your computer and use it in GitHub Desktop.
Save trey/ff975086c55aec0fe1a04e30b456813d to your computer and use it in GitHub Desktop.
Remove Tumblr URL cruft.
.tmblr-iframe—app-cta-button {
display: none !important;
}
$(document).ready(function() {
// Remove Tumblr redirects (inspired by magnusthemes@tumblr)
$('a[href*="href.li"]').each(function() {
let originalURL = $(this).attr('href');
let replaceURL = originalURL.replace('https://href.li/?', '').replace(/\?b\=.+$/, '');
$(this).attr('href', replaceURL);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment