Deprecated: Return type of I::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/public/kirby/toolkit/lib/i.php on line 62

Deprecated: Return type of I::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/public/kirby/toolkit/lib/i.php on line 91

Deprecated: Return type of I::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/public/kirby/toolkit/lib/i.php on line 71

Deprecated: Return type of I::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/public/kirby/toolkit/lib/i.php on line 101

Deprecated: Return type of I::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/public/kirby/toolkit/lib/i.php on line 53

Deprecated: Return type of Collection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/public/kirby/toolkit/lib/collection.php on line 80

Deprecated: parse_str(): Passing null to parameter #1 ($string) of type string is deprecated in /home/public/kirby/toolkit/lib/url.php on line 135
One Tap Less | Open Twitter/App.net profiles from Safari in your favorite client

Open Twitter/App.net profiles from Safari in your favorite client

You’re browsing Safari and find a Twitter profile that sparks your interest. You visit it and get a prompt to install the Twitter official app. You may have it, however, chances are that if you’re reading this, you use Tweetbot. You memorize the Twitter handle, open Tweetbot, tap search, type the user name and you’re finally there. What if we could build a bookmarklet for this?

javascript:window.location='tweetbot:///user_profile'+location.pathname

Most of that bookmarklet is straightforward, what you may want to know is that, while in a Twitter user page, location.pathname grabs the handle preceded with a slash. If you're checking my Twitter user, it would send /Pgruneich to Tweetbot. The slash allows us to skip the one after user_profile in Tweetbot's url scheme.

But what if you want to go straight to a mention to the user? You can't mention with a slash, so we're going to skip that.

javascript:window.location='tweetbot:///post?text=%40'location.pathname.substring(1)

I bet you're already have some url encoded characters on the top of your head, so you can identify the at sign (%40). But what about that substring(1)? We're telling the parameter to start our pathname from the index 1, remember it starts counting in 0, so our index 0 is the slash, meanwhile our index 1 is the first character from the user handle.

But what about some App.net love? We're just modifying the url scheme. You can't automatize to open a profile in Riposte because it requires the user's numeric ID. You can, however, still jump straight to the mention:

javascript:window.location='riposte://x-callback-url/createNewPost?text=%40'+location.pathname.substring(1)

Felix is a little more flexible and supports the user handle with the '@' prefix. You can open a profile in Felix with this bookmarklet:

javascript:window.location='felix://user/@'+location.pathname.substring(1)

Or mention the user with:

javascript:window.location='felix://compose/post?text=%40'+location.pathname.substring(1)

But you don't want to clutter your bookmarks with all these, you may prefer a Launch Center Pro approach.

javascript:window.location='launchpro://?url='+encodeURIComponent('launchpro://?url=[list:Open '+location.pathname.substring(1)+'|Mention on Tweetbot=tweetbot:///post?text=%40|Open on Tweetbot=tweetbot:///user_profile/|Mention on Riposte=riposte://x-callback-url/createNewPost?text=%40|Mention on Felix=felix://compose/post?text=%40|Open on Felix=felix://user/@]'+location.pathname.substring(1))

Now you have everything covered, Tweetbot, Riposte and Felix. You say you use Twitterrific? You can easily include it based on its url scheme, may that be your weekend challenge. Happy stalking!