// 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) {
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];
<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>