Skip to content

Instantly share code, notes, and snippets.

@trey
Last active February 27, 2021 20:28
Show Gist options
  • 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);
});
});
@trey
Copy link
Author

trey commented Feb 21, 2021

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