Skip to content

Instantly share code, notes, and snippets.

@hyuki0000
Created July 25, 2017 06:02
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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