mirror of
https://github.com/golang/go
synced 2024-11-21 17:54:39 -07:00
gophertool: also accept commit form 8486:ab29d2698a47
... as "hg log" produces by default. And add a README. R=rsc, bradfitz CC=golang-dev https://golang.org/cl/4529080
This commit is contained in:
parent
32d127823f
commit
f5a011dd0c
8
misc/chrome/gophertool/README.txt
Normal file
8
misc/chrome/gophertool/README.txt
Normal file
@ -0,0 +1,8 @@
|
||||
To install:
|
||||
|
||||
1) chrome://extensions/
|
||||
2) click "[+] Developer Mode" in top right
|
||||
3) "Load unpacked extension..."
|
||||
4) pick $GOROOT/misc/chrome/gophertool
|
||||
|
||||
Done. It'll now auto-reload from source.
|
@ -13,7 +13,7 @@ function focusinput() {
|
||||
}
|
||||
|
||||
var numericRE = /^\d+$/;
|
||||
var commitRE = /^[0-9a-f]{6,20}$/;
|
||||
var commitRE = /^(?:\d+:)?([0-9a-f]{6,20})$/; // e.g "8486:ab29d2698a47" or "ab29d2698a47"
|
||||
var pkgRE = /^[a-z0-9_\/]+$/;
|
||||
|
||||
function navigate() {
|
||||
@ -38,8 +38,9 @@ function navigate() {
|
||||
return success("http://codereview.appspot.com/" + t + "/");
|
||||
}
|
||||
|
||||
if (commitRE.test(t)) {
|
||||
return success("http://code.google.com/p/go/source/detail?r=" + t);
|
||||
var match = commitRE.exec(t);
|
||||
if (match) {
|
||||
return success("http://code.google.com/p/go/source/detail?r=" + match[1])
|
||||
}
|
||||
|
||||
if (pkgRE.test(t)) {
|
||||
|
Loading…
Reference in New Issue
Block a user