I have been trying to find a bookmarklet that will allow you to view a specific tweet in the twitter app. The API needed is twitter://status?id=124556789012345789 and it will open tweet id 124556789012345789 which is found in the URL. I need to pull the tweet id from the URL and add it to the twitter://status?id=. The problem, is that the URL with the tweet id in it is https://mobile.twitter.com/(username)/status/(tweet id) and the username can vary. I tried to do javascript:var s = (location.href); but the * in the username didn’t act as an unknow variable, as it sometimes does. Any help would be greatly appreciated.
var u = s.replace("https://mobile.twitter.com/*/status/", "twitter://status?id="));window.open(u);
I have been trying to find a bookmarklet that will allow you to view
Share
Tada!
javascript:var a = (location.href); var b = a.split("/"); var c = b[5].replace("?photo=1",""); var d = ('twitter://status?id='+c); window.location = (d);