Room 208

Elaborate Burn

Changing post types and the new dashboard

As you probably well know by now, Tumblr rolled out a new dashboard design towards the end of last month. The new design no longer has any standard HTML forms, instead moving to Backbone.js, and thus the method for changing post types outlined in my previous guide no longer works. I spent about an hour today poking around to see if I could find an easy way to update the Backbone.js model and save it to the server, but alas, all that minified JavaScript proved too much for me. There still is at least one difficult way to do this, however.

Continue reading

First, open up the post edit page in your favorite web inspector, and head over to the network traffic pane. Make sure it’s recording requests and responses. In Chrome, for instance, look for the bright red “record” circle in the top left corner – if it’s grayed out, click it to start recording.

Now, go back to the edit page itself and click the Save button without making any changes. Return to the inspector and look for a request made to https://www.tumblr.com/svc/post/update.

Open it up and copy the request body, which should be a JSON object. This is a bit hard to find in Chrome; you’ll need to go to the Headers tab and click View source next to Request Payload to get what you’re looking for.

Head to the console and paste what you’ve just copied. Locate the field named post[type] and change its value as before. In the figure, I’m changing the post type from quote to text, and assigning the whole object to a new variable called alteredJSONData for convenience.

Now we’ll use the page’s jQuery object to make our altered request in the console, while still maintaining the security headers Tumblr uses:

jQuery.ajax("/svc/post/update", {
    data: JSON.stringify(alteredJSONData),
    type: "POST",
    contentType: "application/json",
    dataType: "json",
    processData: false
});

You’ll get a response object back if the request was successfully made.

Now reload the dashboard and the post in question should appear with its type changed. It’s a hack, but it works.


Updated March 19, 2015 to add screenshots.