diff options
author | Michael Stapelberg <stapelberg@debian.org> | 2013-03-04 21:27:36 +0100 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2013-03-04 21:27:36 +0100 |
commit | 04b08da9af0c450d645ab7389d1467308cfc2db8 (patch) | |
tree | db247935fa4f2f94408edc3acd5d0d4f997aa0d8 /misc/chrome/gophertool/popup.html | |
parent | 917c5fb8ec48e22459d77e3849e6d388f93d3260 (diff) | |
download | golang-upstream/1.1_hg20130304.tar.gz |
Imported Upstream version 1.1~hg20130304upstream/1.1_hg20130304
Diffstat (limited to 'misc/chrome/gophertool/popup.html')
-rw-r--r-- | misc/chrome/gophertool/popup.html | 51 |
1 files changed, 8 insertions, 43 deletions
diff --git a/misc/chrome/gophertool/popup.html b/misc/chrome/gophertool/popup.html index 4816c392b..8bb7795fa 100644 --- a/misc/chrome/gophertool/popup.html +++ b/misc/chrome/gophertool/popup.html @@ -6,49 +6,14 @@ --> <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> +<script src="popup.js"></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 /><input type="submit" value="go" /></nobr></form> -<small>Also: <a href="#" onclick="openURL('http://build.golang.org/')">buildbots</small> +<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> +<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> </body> </html> |