Skip to content

Instantly share code, notes, and snippets.

@masashinakata
Created June 21, 2018 18:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masashinakata/cd5960829c7e7ed6f278d2e28331de46 to your computer and use it in GitHub Desktop.
Save masashinakata/cd5960829c7e7ed6f278d2e28331de46 to your computer and use it in GitHub Desktop.
(function () {
var url = location.href;
if (! url.match(/beta/)) {
var a = url.split('/'), b = a[2].split('.');
location.href = 'https://beta.atcoder.jp/contests/' + b[0] + '/tasks/' + a[a.length - 1];
}
else {
var a = url.split('/'), b = a[2].split('.');
location.href = 'https://' + a[4] + '.contest.atcoder.jp/tasks/' + a[a.length - 1];
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment