From 96adaa5618b8742d2c96536afe4d5ace17ce214c Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Mon, 8 Sep 2014 10:05:20 +1000 Subject: [PATCH] go.tools/godoc: remove Google+ buttons LGTM=bradfitz R=golang-codereviews, bradfitz, dsymonds CC=golang-codereviews https://golang.org/cl/138180043 --- godoc/static/godoc.html | 1 - godoc/static/godocs.js | 10 ---- godoc/static/static.go | 126 ++++++++++++++++++---------------------- 3 files changed, 57 insertions(+), 80 deletions(-) diff --git a/godoc/static/godoc.html b/godoc/static/godoc.html index ee6a3a6d..c851c528 100644 --- a/godoc/static/godoc.html +++ b/godoc/static/godoc.html @@ -61,7 +61,6 @@ func main() {
{{with .Title}} -

{{html .}}

{{end}} {{with .Subtitle}} diff --git a/godoc/static/godocs.js b/godoc/static/godocs.js index 81dd1210..c4a61e06 100644 --- a/godoc/static/godocs.js +++ b/godoc/static/godocs.js @@ -232,15 +232,6 @@ function toggleHash() { } } -function addPlusButtons() { - var po = document.createElement('script'); - po.type = 'text/javascript'; - po.async = true; - po.src = 'https://apis.google.com/js/platform.js'; - var s = document.getElementsByTagName('script')[0]; - s.parentNode.insertBefore(po, s); -} - $(document).ready(function() { bindSearchEvents(); generateTOC(); @@ -256,7 +247,6 @@ $(document).ready(function() { setupTypeInfo(); setupCallgraphs(); toggleHash(); - addPlusButtons(); // godoc.html defines window.initFuncs in the tag, and root.html and // codewalk.js push their on-page-ready functions to the list. diff --git a/godoc/static/static.go b/godoc/static/static.go index 53d58a5c..30e63fbe 100644 --- a/godoc/static/static.go +++ b/godoc/static/static.go @@ -306,14 +306,14 @@ var Files = map[string]string{

Internal call graph

-

- This viewer shows the portion of the internal call - graph of this package that is reachable from this function. - See the package's call - graph for more information. -

- -
+

+ This viewer shows the portion of the internal call + graph of this package that is reachable from this function. + See the package's call + graph for more information. +

+ + `, @@ -530,7 +530,6 @@ func main() {
{{with .Title}} -

{{html .}}

{{end}} {{with .Subtitle}} @@ -806,15 +805,6 @@ function toggleHash() { } } -function addPlusButtons() { - var po = document.createElement('script'); - po.type = 'text/javascript'; - po.async = true; - po.src = 'https://apis.google.com/js/platform.js'; - var s = document.getElementsByTagName('script')[0]; - s.parentNode.insertBefore(po, s); -} - $(document).ready(function() { bindSearchEvents(); generateTOC(); @@ -830,7 +820,6 @@ $(document).ready(function() { setupTypeInfo(); setupCallgraphs(); toggleHash(); - addPlusButtons(); // godoc.html defines window.initFuncs in the tag, and root.html and // codewalk.js push their on-page-ready functions to the list. @@ -1111,7 +1100,7 @@ function cgAddChild(tree, ul, cgn) {

Implements

-
...
+
...
`, @@ -1502,7 +1491,7 @@ function cgAddChild(tree, ul, cgn) {

Method set

-
...
+
...
`, @@ -1533,9 +1522,9 @@ function cgAddChild(tree, ul, cgn) { --> {{with .PDoc}} + document.ANALYSIS_DATA = {{$.AnalysisData}}; + document.CALLGRAPH = {{$.CallGraph}}; + {{if $.IsMain}} {{/* command documentation */}} @@ -1639,35 +1628,34 @@ function cgAddChild(tree, ul, cgn) {

Internal call graph ▾

-

- In the call graph viewer below, each node - is a function belonging to this package - and its children are the functions it - calls—perhaps dynamically. -

-

- The root nodes are the entry points of the - package: functions that may be called from - outside the package. - There may be non-exported or anonymous - functions among them if they are called - dynamically from another package. -

-

- Click a node to visit that function's source code. - From there you can visit its callers by - clicking its declaring func - token. -

-

- Functions may be omitted if they were - determined to be unreachable in the - particular programs or tests that were - analyzed. -

- - - +

+ In the call graph viewer below, each node + is a function belonging to this package + and its children are the functions it + calls—perhaps dynamically. +

+

+ The root nodes are the entry points of the + package: functions that may be called from + outside the package. + There may be non-exported or anonymous + functions among them if they are called + dynamically from another package. +

+

+ Click a node to visit that function's source code. + From there you can visit its callers by + clicking its declaring func + token. +

+

+ Functions may be omitted if they were + determined to be unreachable in the + particular programs or tests that were + analyzed. +

+ +
@@ -1722,7 +1710,7 @@ function cgAddChild(tree, ul, cgn) {
{{node_html $ .Decl true}}
{{comment_html .Doc}} {{example_html $ .Name}} - {{callgraph_html $ "" .Name}} + {{callgraph_html $ "" .Name}} {{end}} {{range .Methods}} @@ -1732,7 +1720,7 @@ function cgAddChild(tree, ul, cgn) { {{comment_html .Doc}} {{$name := printf "%s_%s" $tname .Name}} {{example_html $ $name}} - {{callgraph_html $ .Recv .Name}} + {{callgraph_html $ .Recv .Name}} {{end}} {{end}} {{end}} @@ -2638,23 +2626,23 @@ function PlaygroundOutput(el) { license that can be found in the LICENSE file. --> {{range $key, $val := .Idents}} - {{if $val}} + {{if $val}}

{{$key.Name}}

- {{range $val}} - {{$pkg_html := pkgLink .Path | html}} + {{range $val}} + {{$pkg_html := pkgLink .Path | html}} {{if eq "Packages" $key.Name}} - {{html .Path}} + {{html .Path}} {{else}} - {{$doc_html := docLink .Path .Name| html}} - {{html .Package}}.{{.Name}} - {{end}} - {{if .Doc}} -

{{comment_html .Doc}}

- {{else}} -

No documentation available

- {{end}} - {{end}} - {{end}} + {{$doc_html := docLink .Path .Name| html}} + {{html .Package}}.{{.Name}} + {{end}} + {{if .Doc}} +

{{comment_html .Doc}}

+ {{else}} +

No documentation available

+ {{end}} + {{end}} + {{end}} {{end}} `,