Last active
January 15, 2019 02:57
-
-
Save hyuki/eec856e19db90ba80f54251e018b3059 to your computer and use it in GitHub Desktop.
ShowMobileTweet.js - Bookmarklet to jump from twitter.com to mobile.twitter.com.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* ShowMobileTweet.js | |
* | |
* When you see: | |
* https://twitter.com/hyuki/status/1079981317184315392 | |
* Then jump to: | |
* https://mobile.twitter.com/hyuki/status/1079981317184315392 | |
*/ | |
function start() { | |
var url = location.href; | |
if (url.match(/^https?:\/\/(mobile\.)?twitter\.com\/(.+)/)) { | |
var tail = RegExp.$2; | |
location = 'https://mobile.twitter.com/' + tail; | |
} else { | |
alert("Twitter URL is not found.\n" + url); | |
} | |
} | |
start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://snap.textfile.org/20190113000000/