Twitter.com Frame Escaping Code

<script>
function bust () {
  document.write = "";
  window.top.location = window.self.location;
  setTimeout(function() {
    document.body.innerHTML = '';
    }, 0);
  window.self.onload = function(evt) {
    document.body.innerHTML = '';
  };
}
if (window.top !== window.self) { // are you trying to put self in an iframe?
  try {
    if (window.top.location.host) { // this is illegal to access unless you share a non-spoofable document domain
      // fun times
    } else {
      bust(); // chrome executes this
    }
  } catch (ex) {
    bust(); // everyone executes this
  }
}
</script>

Twitter’s cute little information gathering tool… the short URL

You’ve probably seen Twitter’s URL shortener, “t.co”, pop up in links.  Then again, you might not even realize it’s there.  Whenever you post a link, it will be shortened with this service automatically.  Interestingly, even a URL that is short enough already, or shortened with another service, will still be shortened into a “t.co” short link.  Their FAQ suggests that all of your links and even your URL shorteners will still work.  It’s just that your click will get passed through “t.co” before it goes on to the URL shortener and then on to your final destination. 1

The reason why seems pretty obvious – because they want to see what people are clicking on and why.  As with other social websites, the users are the product and commodity being sold to advertisers.  Don’t get me wrong – I don’t have a philosophical problem with this.  It seems a decent and legitimate enterprise and a reasonable bargain with the end user for the free use of their service. 2

So, I’m the kind of guy who, seeing a link on a website will sometimes copy and paste that link into an open browser tab, rather than clicking on it.  Sure, it’s 10 more seconds out of my day – but it gives me a perverse little bit of pleasure to thwart such information surveillance.  Imagine my surprise today to discover that this didn’t work!  I went to Twitter, highlighted and copied a Bit.ly link, and pasted it into an address bar.  But what appeared was the “t.co” link!  I figured I must have messed up the coping, so I did it again. 3  Again, I get the “t.co” link.  Once more into the breach.  Again, the same “t.co” link.

Then I notice that each time I hit “Ctrl-C” or right click on the highlighted link the link text flashes for just a moment.  I do it a few more times and realize what’s happening.

Whenever the Javascript in Twitter’s website detects a “Ctrl-C” or right mouse click on a link, which has the CSS class “twitter-timeline-link”, it will swap out the text of the URL for the “t.co” shortened URL.

This little bit of tech just tickles me.  I can conceive of a legitimate reason for this behavior – ubiquitous and imperceptible URL shortening for the ease of all users. 4  But, really, this is just about controlling all links that originate from Twitter so that they can aggregate and analyze.  I just admire this behavior because it is just so slick and nearly totally seamless.

  1. I would point out that when the URL appears in an RSS feed, it shows up as a “t.co” link, which goes through “bit.ly”, instead of the actual link itself. []
  2. I’m not trying to describe their service in any pejorative terms, I’m just trying to describe it accurately.  I don’t think anyone would dispute this is their business model. []
  3. After all, Ctrl-C can get pretty complicated. []
  4. Perhaps you were going to copy/paste the URL into an e-mail and now you won’t have to worry about a broken URL []

Why tweet?

Seriously, why “Tweet”? 1

If I had never known about Twitter and were asked to start a company exactly like it, I would have called it “Bleeter” instead.  Anything you said in 140 characters would be a “Bleet.”  And, best of all, the phrase “Follow me” would just make SO much more sense when you’re talking about sheep.

  1. I’m pretty late to the whole “Twitter” phenom. []

Like little lambs

I just assumed I would have no followers on Twitter except those interested in my particular MakerBot.  But then I see people with HUGE numbers of followers/followees who are following me.

Thus, I ask these non-rhetorical questions: Do some people on Twitter follow you for the purpose of getting more followers in return?  How could anyone with monitor more than a few dozen friends without giving up their day job?

Too much information

Have you read The Hitchhiker’s Guide To The Galaxy?  Of course you have.

You remember that bit where they put Zaphod in the machine designed to drive people insane by showing them the entire universe all at once?  Well, that’s how Google Wave feels to me.  There’s a LOT of freaking information there.  I made the mistake of looking directly at the MakerBot wave.  It was like falling into the gaping maw of eternity.  I’ll stick to RSS feeds, MakerBot Operators group, and Twitter, thankyouverymuch. 1

  1. You can find it in your Google Wave account by looking for “with:public makerbot”…  If you dare! []

Blind reading the blind…

I just noticed there’s a Twitter feed ( http://twitter.com/CanMakeIt ) following this blog.  Since my post titles tend to be more whimsical and self-referential than informative, I feel kinda bad for anyone mislead into clicking on the titles.

If you’re one of those who came to this blog wondering what the hell I’m babbling about…  um, sorry.  I’m frequently off topic.  Sorry for clogging up your RepRap aggregated feed!