Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
[clipMenu] GitHubのCopy pathボタンから得られたパスをブログ用gist-itパスに変換
* ClipMenu用スクリプト
* gist-itのパス表現はここを参照した
* 適当に書き換えて使ってください
clipText = clipText.trim();
var myPath = clipText.split("/");
var txt = '<script src="[user]/'; //[user]の部分がユーザー名
txt += myPath.shift();
txt += "/blob/master/";
txt += myPath.join("/") + '"></script>';
return txt;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment