もっといい方法ありそう。
chromeの拡張です。
var links = document.getElementsByTagName("a"); for ( var i in links ) { var link = links[i]; if ( link.href && link.href.match(/https:\/\/github.com\/.+\/.+\/commit\//) && !link.href.match(/#/) ) { link.href += "?w=1"; } }
{
"manifest_version": 2,
"version": "1.0",
"name": "ギッハブのコミット詳細リンクを?w=1付きにしちゃうぞ",
"content_scripts": [
{
"matches": ["https://github.com/*"],
"js": ["app.js"]
}
]
}