Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/*
* FameList.js
*
* When you see
* https://twitter.com/EXAMPLEUSER/...
* Then you jump to
* https://twitter.com/EXAMPLEUSER/memberships
*
* Written by Hiroshi Yuki.
* Licensed under CC0.
* https://creativecommons.org/publicdomain/zero/1.0/
*
*/
function start() {
var url = location.href;
var r = url.match(/^https:\/\/twitter\.com\/([^\/]+)/);
if (r) {
var username = r[1];
location = 'https://twitter.com/' + username + '/memberships';
} else {
alert("Username is not found.");
}
}
start();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment