]> Cypherpunks repositories - gostls13.git/commitdiff
misc/chrome/gophertool: update for the git/gerrit transition
authorShenghou Ma <minux@golang.org>
Wed, 10 Dec 2014 00:41:52 +0000 (19:41 -0500)
committerMinux Ma <minux@golang.org>
Thu, 18 Dec 2014 07:34:46 +0000 (07:34 +0000)
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>
misc/chrome/gophertool/gopher.js
misc/chrome/gophertool/popup.html

index 686e2175f9bf76ba9672ba354f116b9a8ac97b7a..c09c4ef10c044201550e19e5f85716120cd4b37c 100644 (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];
index 8bb7795faca16ca64199fe56b3830f02c1f05dd2..97404062761126972a9e8c8de0d6c4ddde4d9b7f 100644 (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>