mirror of
https://github.com/golang/go
synced 2024-11-23 00:40:08 -07:00
6dfe0162a6
As our CL number could be as small as 152046, changed CL number's lower bound to 150000. Hopefully our issue count won't reach 150000 any time soon. Chrome on Mac OS X has very strange behavior regarding the focus, although we force the focus to the input box on load, the page still come up with focus on "issue". Set the tabindex of the input box as a workaround. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/6212055
55 lines
1.5 KiB
HTML
55 lines
1.5 KiB
HTML
<html>
|
|
<!--
|
|
Copyright 2011 The Go Authors. All rights reserved.
|
|
Use of this source code is governed by a BSD-style
|
|
license that can be found in the LICENSE file.
|
|
-->
|
|
<head>
|
|
<script src="gopher.js"></script>
|
|
<script>
|
|
|
|
function focusinput() {
|
|
document.getElementById("inputbox").focus();
|
|
}
|
|
|
|
function navigate() {
|
|
var box = document.getElementById("inputbox");
|
|
box.focus();
|
|
|
|
var t = box.value;
|
|
if (t == "") {
|
|
return false;
|
|
}
|
|
|
|
var success = function(url) {
|
|
console.log("matched " + t + " to: " + url)
|
|
box.value = "";
|
|
openURL(url);
|
|
return false; // cancel form submission
|
|
};
|
|
|
|
var url = urlForInput(t);
|
|
if (url) {
|
|
return success(url);
|
|
}
|
|
|
|
console.log("no match for text: " + t)
|
|
return false;
|
|
}
|
|
|
|
function openURL(url) {
|
|
chrome.tabs.create({ "url": url })
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body onload="focusinput()" style='margin: 0.5em; font-family: sans;'>
|
|
<small><a href="#" onclick="openURL('http://code.google.com/p/go/issues/list')">issue</a>,
|
|
<a href="#" onclick="openURL('http://codereview.appspot.com/')">codereview</a>,
|
|
<a href="#" onclick="openURL('http://code.google.com/p/go/source/list')">commit</a>, or
|
|
<a href="#" onclick="openURL('http://golang.org/pkg/')">pkg</a> id/name:</small>
|
|
<form style='margin: 0' onsubmit="return navigate();"><nobr><input id="inputbox" size=10 tabindex=1 /><input type="submit" value="go" /></nobr></form>
|
|
<small>Also: <a href="#" onclick="openURL('http://build.golang.org/')">buildbots</small>
|
|
</body>
|
|
</html>
|