<->Gists API
by
noromanba
2012-06-15 [2012/06/15 04:38:26]
Go and back Gists API v3
/*
* @title <->Gists API
* @description Go and back Gists API v3
* @include https://gist.github.com/*
* @include https://api.github.com/gists/*
* @license MIT License http://nrm.mit-license.org/2012
* @require
*/
(function () {
var id;
if ((id = (/^https:\/\/gist\.github\.com\/(\d+)/.exec(location.href) || [])[1])) {
location.href = 'https://api.github.com/gists/' + id;
} else if ((id = (/^https:\/\/api\.github\.com\/gists\/(\d+)/.exec(location.href) || [])[1])) {
location.href = 'https://gist.github.com/' + id;
}
})();
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。