2

I'm trying to mimic the new Tumblr Text Post that removes blockquotes so all the important text is visible in a 250px text post without having to scroll. Of course Tumblr hasn't updated their entire code so blockquotes are still wrapped in custom themes.

Here's what I have so far: http://01244235.tumblr.com/

I unwrapped the blockquote tag. Now I want to remove the links of the users who have commented.

I know there isn't a simple way of just unwrapping the entire thing until Tumblr updates their codebase. So I'm just going to remove the links entirely.

So is there a way to pick up a specific part of the code and remove it? I don't want to just remove href links because the actual text post might have some in it.

So I want to remove every <p><a class="tumblr_blog" href=""></a></p> from the post.

Any ideas?

matt.
  • 2,355
  • 5
  • 32
  • 43
Tash
  • 27
  • 5

2 Answers2

0

If you're just looking to remove it from the DOM, try:

    $(".tumblr_blog").remove(); 
GLNRO
  • 21
  • 2
  • I tried that already and it still leaves space because it doesn't remove the `

    ` tags. Thanks anyway though!

    – Tash Oct 31 '15 at 06:23
0

In that case you would write:

$('p .tumblr_blog').remove();

But why not just remove the {Blockquote} tags from the theme, rather than relying on a front end solution. Or even just hide it using css:

p .tumblr_blog {
   display:none;
}
lharby
  • 3,057
  • 5
  • 24
  • 56
  • I tried this as well but it didn't work out the first time. I thought there was an easier method to just remove an entire sequence of tags instead of doing it manually. Also the `{blockquote}` variable doesn't work on Tumblr. Anyway, I tried it again and this time used :contain to remove the colon and now it's working. Thanks! – Tash Oct 31 '15 at 18:14