Room 208

Elaborate Burn

Posts from #webdev

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.

Everything Becomes F: The Perfect Insider (Japanese)

An adaptation of Hiroshi Mori’s sci-fi mystery novel, which won the first Mephisto Prize back in 1996. It’s airing in noitaminA this winter, animated by A-1 Pictures with character designs by Inio Asano of Oyasumi Punpun fame. Gotta say, I really like what they’re doing with the website.

@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 y…
Download video Isn’t it great when your silly jokes cause UI …
An anonymous correspondent writes: I am begging you to do a…
Changing post types and the new dashboard
@adamrobezzoli writes: I saw your post (“Changing the type …
I poked around today to see if I could use the Tumblr API to ch…
Yeah, this isn’t a bad background for a login page. Not at all!
Dear Tumblr, Nice of you to only remember whether I’ve seen th…
There’s a hideous irony in Tumblr warning their users to change…
It’s more than a little strange that Tumblr supports (well, “su…
@usgmr writes: Woah, oneechan noticed me. haha. Anyway, rig…
noxki writes about Tumblr’s sticky controls: Anyway, work a…
A public service announcement
So Tumblr added @-mentions not too long ago. Here’s what you t…
Dear Tumblr, Have you considered allowing more than one file i…
Changing the type of an existing Tumblr post
Download video Is the word “excessive” not in the vocabulary …
gif.js
The definitive guide to forms based website authentication
I don’t know how I forgot to mention this in my litany of compl…
Dear Tumblr, This new photo uploader is terrible. The one thin…
Dear Tumblr, Please stop calling window.focus() in you…
Realtime Web Messaging over Animated GIFs
Download video Those of you who know me know that I’m not a h…
Introducing pathod: a pathological HTTP server