Simon's tech blog and lab


Delete all of your Tumblr posts without closing your blog

5 Comments

I got into a situation where I wanted to wipe all of the posts in my Tumblr blog but I didn’t want to close it and lose all of the people I was following.  After doing some poking around (thanks to this post by Louis Li) I found out that Tumblr uses Prototype, which actually seems like a way cool Javascript library.

Anyway this is a bit technical but here’s the trick (working as of August 2013).

Click on your Posts and go to Mass Post Editor, this will bring up http://www.tumblr.com/mega-editor/[[YOURBLOGNAME]]


Update: mozilla-firefox Firefox specific (but will probably work in Chrome somehow) - I ended up writing an interesting script that incorporates this code into an easy to use button.  When you get to your Mass Post Editor page hit CTRL+SHIFT+Q to bring up the Inspect Element dashboard, go to the console, and paste in the following at the bottom > prompt;

$.getScript('http://foozwak.net/js/mkbtn.js');

On your top-right you will now see a “Mass Delete” button that will prompt you to delete the first 99 posts visible in your editor.


If the above method fails you… in Firefox right click on this page and go to “Inspect Element”.  On the fancy dashboard that comes up, click on Console.   Paste this into the very bottom and hit enter.   In Chrome, you can paste this line into the search bar, but you’ll have to add “javascript:” back to the front because it takes that out.

You will be asked if you want to delete the selected posts.

javascript:var count=0; $('.brick').each(function() { count++; if(count<100) { $(this).addClass('highlighted'); }; }); delete_selected_posts();

Tumblr will only delete 100 posts at a time probably to stop users from crashing their systems with insane numbers of operations.

Here’s a quick formula to do about 790 posts(!!), you’ll have to babysit it a little but it works.

javascript:var count=0; $('.brick').each(function() { count++; if(count<100) { $(this).addClass('highlighted'); }; }); delete_selected_posts(); alert('wait 5 seconds');
javascript:var count=0; $('.brick').each(function() { count++; if(count<100) { $(this).addClass('highlighted'); }; }); delete_selected_posts(); alert('wait 5 seconds');
javascript:var count=0; $('.brick').each(function() { count++; if(count<100) { $(this).addClass('highlighted'); }; }); delete_selected_posts(); alert('wait 5 seconds');
javascript:var count=0; $('.brick').each(function() { count++; if(count<100) { $(this).addClass('highlighted'); }; }); delete_selected_posts(); alert('wait 5 seconds');
javascript:var count=0; $('.brick').each(function() { count++; if(count<100) { $(this).addClass('highlighted'); }; }); delete_selected_posts(); alert('wait 5 seconds');
javascript:var count=0; $('.brick').each(function() { count++; if(count<100) { $(this).addClass('highlighted'); }; }); delete_selected_posts(); alert('wait 5 seconds');
javascript:var count=0; $('.brick').each(function() { count++; if(count<100) { $(this).addClass('highlighted'); }; }); delete_selected_posts(); alert('wait 5 seconds');
javascript:var count=0; $('.brick').each(function() { count++; if(count<100) { $(this).addClass('highlighted'); }; }); delete_selected_posts(); alert('We will now reload'); location.reload();


 
Tags: , , ,
Posted in: Kung-Fu, Software

5 Comments (Leave a comment) »

Leave a Reply