And don’t let the door hit you on the way out
After ages of complaining about Tumblr, I
finally went and did something about it. This is something I hacked up
in a couple of hours using Tumblr’s JSON export and a static site
generator. Maybe someday I’ll post the source code.
You know where to complain if something’s broken.
Tumblr has started making link posts point to an interstitial redirect
on t.umblr.com
, instead of directly to the actual page. In the spirit
of Google’s incredibly annoying
redirector,
the URLs are hideous:
http://t.umblr.com/redirect?t=ZDEwZGUwNGIxMmVlNTAxMTNiOTAzYWQ
yYjY1ZTdmMjM2MzAwN2NmYSxFSnRleTUxQw%3D%3D&u=aHR0cDovL3d3dy5mL
W5vaXRhbWluYS5jb20%3D
t
appears to be a Base64-encoded token specific to the post, while u
is just the Base64-encoded URL. The redirector at least checks that the
token matches the URL so that it can’t be used for phishing by setting
an arbitrary target, which raises the question of why the URL is there
in the first place, in a format that’s opaque to human readers.
Not following Google’s example, the redirect is performed as an HTML
<meta>
refresh. This is stupid for a multitude of reasons, not the
least of which is that it confuses clients that aren’t Web
browsers. Moreover,
while Google waits until the link is clicked on to replace the URL, so
the status bar remains useful, Tumblr doesn’t. This means that there’s
no visible indication of where a link really points if you’re not on the
dashboard.
What is the point of all this? Analytics, most likely, though of course
given Tumblr’s remarkable lack of communication about its platform the
real reason is anyone’s guess. What I do know is that it’s dumb.
@sunbinamra writes:
Hi! First off, thank you so much for the post about changing type of
Tumblr post - I’ve managed to turn a couple of posts from text to
photo. However, I’m a complete novice when it comes to codes, hacks,
etc. and in both cases I end up with a blank ghost image at the
beginning that I can’t seem to get rid of. Do you have any idea what
might be causing this? Thanks again!
I suspect that since the post type conversion doesn’t have a value for
the image field, Tumblr inserts a reference to a nonexistent image
instead. (This isn’t your fault; it’s just a quirk of how the data is
stored on the server.) Ordinarily, you’d be able to delete it using the
dashboard, but the button to do so only appears when you hover over the
image. Since the image doesn’t actually exist, it’s displayed with a
height of zero pixels. Can’t really hover over that.
What you can do, though, is simulate a click on the delete button. To do
this, open up the broken post’s edit page, and paste the following in
the developer console:
$('.remove-button').first().click();
If you haven’t added any other images yet, the standard Upload photos
and Add photo from web options should appear inside the edit form,
indicating that Tumblr thinks there are no longer any images attached to
the post. In either case, save once you’ve changed the images to your
liking, and you should be on your merry way.
The internet is for functions that invisibly mess with HTML comments
In other news, I’ve discovered that the Tumblr dashboard defines a
JavaScript function called Tumblr.porn()
. It is, as you might expect,
useless – not quite a no-op, but almost essentially so.
An anonymous correspondent writes:
I’m having issues with your most recent tutorial on changing post
types because there never seems to be a request made to
svc/post/update, even though I am recording requests and responses
when saving the post and have tried many times. Any ideas? It’s a text
post. Thanks for your time.
I’m not sure what might be causing this, so here’s one random guess –
have you tried making a dummy change to the post before saving? If there
are no changes, the dashboard code may detect that nothing’s changed and
not bother making a request.