Skip to content

Instantly share code, notes, and snippets.

@ganta
Created April 11, 2013 03:58
Show Gist options
  • Save ganta/5360630 to your computer and use it in GitHub Desktop.
Save ganta/5360630 to your computer and use it in GitHub Desktop.
GitHubのcommitのURLの末尾に ?w=1 とつけると差分がわかりやすい(時がある) http://d.hatena.ne.jp/ken_c_lo/20130410/1365623063 を見てやっつけで作ったBookmarkletです。付いてなければ付けるだけです。もっと簡潔な書き方があれば教えてください。
javascript:
var url = location.href;
if (url.match(/^https:\/\/github\.com\/.*\/commit\//)) {
var params = url.split('?')[1];
if (params == undefined) {
location.href = url + '?w=1'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment