/*
* 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();