1
0
mirror of https://github.com/golang/go synced 2024-11-22 20:40:03 -07:00

misc/chrome/gophertool: update for the git/gerrit transition

Change-Id: I7b9601ae6e1cfb18ef79a7b189aa7e689c0fe942
Reviewed-on: https://go-review.googlesource.com/1621
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Shenghou Ma 2014-12-09 19:41:52 -05:00 committed by Minux Ma
parent 0fa6e7fe82
commit fc71d7b8ca
2 changed files with 13 additions and 6 deletions

View File

@ -3,7 +3,8 @@
// license that can be found in the LICENSE file.
var numericRE = /^\d+$/;
var commitRE = /^(?:\d+:)?([0-9a-f]{6,20})$/; // e.g "8486:ab29d2698a47" or "ab29d2698a47"
var commitRE = /^(?:\d+:)?([0-9a-f]{6,40})$/; // e.g "8486:ab29d2698a47" or "ab29d2698a47"
var gerritChangeIdRE = /^I[0-9a-f]{4,40}$/; // e.g. Id69c00d908d18151486007ec03da5495b34b05f5
var pkgRE = /^[a-z0-9_\/]+$/;
function urlForInput(t) {
@ -21,6 +22,10 @@ function urlForInput(t) {
return "https://golang.org/cl/" + t;
}
if (gerritChangeIdRE.test(t)) {
return "http://golang.org/cl/" + t;
}
var match = commitRE.exec(t);
if (match) {
return "https://golang.org/change/" + match[1];

View File

@ -9,11 +9,13 @@
<script src="popup.js"></script>
</head>
<body style='margin: 0.5em; font-family: sans;'>
<small><a href="#" url="http://code.google.com/p/go/issues/list">issue</a>,
<a href="#" url="http://codereview.appspot.com/">codereview</a>,
<a href="#" url="http://code.google.com/p/go/source/list">commit</a>, or
<a href="#" url="http://golang.org/pkg/">pkg</a> id/name:</small>
<small><a href="#" url="https://golang.org/issue">issue</a>,
<a href="#" url="https://golang.org/cl">codereview</a>,
<a href="#" url="https://golang.org/change">commit</a>, or
<a href="#" url="https://golang.org/pkg/">pkg</a> id/name:</small>
<form style='margin: 0' id='navform'><nobr><input id="inputbox" size=10 tabindex=1 /><input type="submit" value="go" /></nobr></form>
<small>Also: <a href="#" url="http://build.golang.org">buildbots</a></small>
<small>Also: <a href="#" url="https://build.golang.org">buildbots</a>
<a href="#" url="https://github.com/golang/go">Github</a>
</small>
</body>
</html>