Skip to content

Instantly share code, notes, and snippets.

@hyuki0000
Created July 25, 2017 06:02
Show Gist options
  • Save hyuki0000/8e9dfe14c9e64a0e6853b19a34a9327d to your computer and use it in GitHub Desktop.
Save hyuki0000/8e9dfe14c9e64a0e6853b19a34a9327d to your computer and use it in GitHub Desktop.
/*
* 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