Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
3d00648d
Commit
3d00648d
authored
Oct 22, 2012
by
Shenghou Ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gophertool: fix links
R=bradfitz CC=golang-dev
https://golang.org/cl/6713043
parent
0ae408eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
9 deletions
+17
-9
misc/chrome/gophertool/popup.html
misc/chrome/gophertool/popup.html
+5
-5
misc/chrome/gophertool/popup.js
misc/chrome/gophertool/popup.js
+12
-4
No files found.
misc/chrome/gophertool/popup.html
View file @
3d00648d
...
...
@@ -9,11 +9,11 @@
<script
src=
"popup.js"
></script>
</head>
<body
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>
<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=
"#"
id=
'buildbotslink'
>
buildbots
</small>
<small>
Also:
<a
href=
"#"
url=
"http://build.golang.org"
>
buildbots
</a>
</small>
</body>
</html>
misc/chrome/gophertool/popup.js
View file @
3d00648d
...
...
@@ -2,7 +2,19 @@ function openURL(url) {
chrome
.
tabs
.
create
({
"
url
"
:
url
})
}
function
addLinks
()
{
var
links
=
document
.
getElementsByTagName
(
"
a
"
);
for
(
var
i
=
0
;
i
<
links
.
length
;
i
++
)
{
var
url
=
links
[
i
].
getAttribute
(
"
url
"
);
if
(
url
)
links
[
i
].
addEventListener
(
"
click
"
,
function
()
{
openURL
(
this
.
getAttribute
(
"
url
"
));
});
}
}
window
.
addEventListener
(
"
load
"
,
function
()
{
addLinks
();
console
.
log
(
"
hacking gopher pop-up loaded.
"
);
document
.
getElementById
(
"
inputbox
"
).
focus
();
});
...
...
@@ -32,7 +44,3 @@ window.addEventListener("submit", function () {
console
.
log
(
"
no match for text:
"
+
t
)
return
false
;
});
window
.
addEventListener
(
"
click
"
,
function
()
{
openURL
(
"
http://build.golang.org/
"
);
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment