1 comment

[ 22.9 ms ] story [ 136 ms ] thread
You probably heard of it: Twitter increases the limit up to 240. They enabled it for a part of the users, and I wasn't lucky enough to get into the testing group. As a developer of an app that helps to build tweetstorms I was excited and terrified, so I've decided to explore how the Twitter experiments code works. It turned out to be easy to enable the experiment: it's just a matter of adding `weighted_character_count: true` to the request. I've tried to post 280-length tweets via API but with no luck. Apparently, this trick works only at twitter.com.

So I've decided to build a Google Chrome extension that will hijack the Twitter code and enable the experiment automatically. I've used `MutationObserver` API to watch for DOM and update the div with the initial data JSON before the app reads it. Works like a charm with a single exception: the counter doesn't work and always display "140". The code is open sourced, so you can see how it works internally: https://github.com/kossnocorp/tweet280/blob/master/src/exten...