go.tools/godoc: remove Google+ buttons

LGTM=bradfitz
R=golang-codereviews, bradfitz, dsymonds
CC=golang-codereviews
https://golang.org/cl/138180043
This commit is contained in:
Andrew Gerrand 2014-09-08 10:05:20 +10:00
parent d03e8a67df
commit 96adaa5618
3 changed files with 57 additions and 80 deletions

View File

@ -61,7 +61,6 @@ func main() {
<div class="container"> <div class="container">
{{with .Title}} {{with .Title}}
<div id="plusone"><g:plusone size="small" annotation="none"></g:plusone></div>
<h1>{{html .}}</h1> <h1>{{html .}}</h1>
{{end}} {{end}}
{{with .Subtitle}} {{with .Subtitle}}

View File

@ -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() { $(document).ready(function() {
bindSearchEvents(); bindSearchEvents();
generateTOC(); generateTOC();
@ -256,7 +247,6 @@ $(document).ready(function() {
setupTypeInfo(); setupTypeInfo();
setupCallgraphs(); setupCallgraphs();
toggleHash(); toggleHash();
addPlusButtons();
// godoc.html defines window.initFuncs in the <head> tag, and root.html and // godoc.html defines window.initFuncs in the <head> tag, and root.html and
// codewalk.js push their on-page-ready functions to the list. // codewalk.js push their on-page-ready functions to the list.

View File

@ -306,14 +306,14 @@ var Files = map[string]string{
</div> </div>
<div class="expanded"> <div class="expanded">
<p class="exampleHeading toggleButton"> <span class="text">Internal call graph</span></p> <p class="exampleHeading toggleButton"> <span class="text">Internal call graph</span></p>
<p> <p>
This viewer shows the portion of the internal call This viewer shows the portion of the internal call
graph of this package that is reachable from this function. graph of this package that is reachable from this function.
See the <a href='#pkg-callgraph'>package's call See the <a href='#pkg-callgraph'>package's call
graph</a> for more information. graph</a> for more information.
</p> </p>
<ul style="margin-left: 0.5in" id="callgraph-{{.Index}}" class="treeview"></ul> <ul style="margin-left: 0.5in" id="callgraph-{{.Index}}" class="treeview"></ul>
</div> </div>
</div> </div>
`, `,
@ -530,7 +530,6 @@ func main() {
<div class="container"> <div class="container">
{{with .Title}} {{with .Title}}
<div id="plusone"><g:plusone size="small" annotation="none"></g:plusone></div>
<h1>{{html .}}</h1> <h1>{{html .}}</h1>
{{end}} {{end}}
{{with .Subtitle}} {{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() { $(document).ready(function() {
bindSearchEvents(); bindSearchEvents();
generateTOC(); generateTOC();
@ -830,7 +820,6 @@ $(document).ready(function() {
setupTypeInfo(); setupTypeInfo();
setupCallgraphs(); setupCallgraphs();
toggleHash(); toggleHash();
addPlusButtons();
// godoc.html defines window.initFuncs in the <head> tag, and root.html and // godoc.html defines window.initFuncs in the <head> tag, and root.html and
// codewalk.js push their on-page-ready functions to the list. // codewalk.js push their on-page-ready functions to the list.
@ -1111,7 +1100,7 @@ function cgAddChild(tree, ul, cgn) {
</div> </div>
<div class="expanded"> <div class="expanded">
<p class="exampleHeading toggleButton"> <span class="text">Implements</span></p> <p class="exampleHeading toggleButton"> <span class="text">Implements</span></p>
<div style="margin-left: 1in" id='implements-{{.Index}}'>...</div> <div style="margin-left: 1in" id='implements-{{.Index}}'>...</div>
</div> </div>
</div> </div>
`, `,
@ -1502,7 +1491,7 @@ function cgAddChild(tree, ul, cgn) {
</div> </div>
<div class="expanded"> <div class="expanded">
<p class="exampleHeading toggleButton"> <span class="text">Method set</span></p> <p class="exampleHeading toggleButton"> <span class="text">Method set</span></p>
<div style="margin-left: 1in" id='methodset-{{.Index}}'>...</div> <div style="margin-left: 1in" id='methodset-{{.Index}}'>...</div>
</div> </div>
</div> </div>
`, `,
@ -1533,9 +1522,9 @@ function cgAddChild(tree, ul, cgn) {
--> -->
{{with .PDoc}} {{with .PDoc}}
<script type='text/javascript'> <script type='text/javascript'>
document.ANALYSIS_DATA = {{$.AnalysisData}}; document.ANALYSIS_DATA = {{$.AnalysisData}};
document.CALLGRAPH = {{$.CallGraph}}; document.CALLGRAPH = {{$.CallGraph}};
</script> </script>
{{if $.IsMain}} {{if $.IsMain}}
{{/* command documentation */}} {{/* command documentation */}}
@ -1639,35 +1628,34 @@ function cgAddChild(tree, ul, cgn) {
</div> <!-- .expanded --> </div> <!-- .expanded -->
<div class="expanded"> <div class="expanded">
<h2 class="toggleButton" title="Click to hide Internal Call Graph section">Internal call graph </h2> <h2 class="toggleButton" title="Click to hide Internal Call Graph section">Internal call graph </h2>
<p> <p>
In the call graph viewer below, each node In the call graph viewer below, each node
is a function belonging to this package is a function belonging to this package
and its children are the functions it and its children are the functions it
calls&mdash;perhaps dynamically. calls&mdash;perhaps dynamically.
</p> </p>
<p> <p>
The root nodes are the entry points of the The root nodes are the entry points of the
package: functions that may be called from package: functions that may be called from
outside the package. outside the package.
There may be non-exported or anonymous There may be non-exported or anonymous
functions among them if they are called functions among them if they are called
dynamically from another package. dynamically from another package.
</p> </p>
<p> <p>
Click a node to visit that function's source code. Click a node to visit that function's source code.
From there you can visit its callers by From there you can visit its callers by
clicking its declaring <code>func</code> clicking its declaring <code>func</code>
token. token.
</p> </p>
<p> <p>
Functions may be omitted if they were Functions may be omitted if they were
determined to be unreachable in the determined to be unreachable in the
particular programs or tests that were particular programs or tests that were
analyzed. analyzed.
</p> </p>
<!-- Zero means show all package entry points. --> <!-- Zero means show all package entry points. -->
<ul style="margin-left: 0.5in" id="callgraph-0" class="treeview"></ul> <ul style="margin-left: 0.5in" id="callgraph-0" class="treeview"></ul>
</script>
</div> </div>
</div> <!-- #pkg-callgraph --> </div> <!-- #pkg-callgraph -->
@ -1722,7 +1710,7 @@ function cgAddChild(tree, ul, cgn) {
<pre>{{node_html $ .Decl true}}</pre> <pre>{{node_html $ .Decl true}}</pre>
{{comment_html .Doc}} {{comment_html .Doc}}
{{example_html $ .Name}} {{example_html $ .Name}}
{{callgraph_html $ "" .Name}} {{callgraph_html $ "" .Name}}
{{end}} {{end}}
{{range .Methods}} {{range .Methods}}
@ -1732,7 +1720,7 @@ function cgAddChild(tree, ul, cgn) {
{{comment_html .Doc}} {{comment_html .Doc}}
{{$name := printf "%s_%s" $tname .Name}} {{$name := printf "%s_%s" $tname .Name}}
{{example_html $ $name}} {{example_html $ $name}}
{{callgraph_html $ .Recv .Name}} {{callgraph_html $ .Recv .Name}}
{{end}} {{end}}
{{end}} {{end}}
{{end}} {{end}}
@ -2638,23 +2626,23 @@ function PlaygroundOutput(el) {
license that can be found in the LICENSE file. license that can be found in the LICENSE file.
--> -->
{{range $key, $val := .Idents}} {{range $key, $val := .Idents}}
{{if $val}} {{if $val}}
<h2 id="{{$key.Name}}">{{$key.Name}}</h2> <h2 id="{{$key.Name}}">{{$key.Name}}</h2>
{{range $val}} {{range $val}}
{{$pkg_html := pkgLink .Path | html}} {{$pkg_html := pkgLink .Path | html}}
{{if eq "Packages" $key.Name}} {{if eq "Packages" $key.Name}}
<a href="/{{$pkg_html}}">{{html .Path}}</a> <a href="/{{$pkg_html}}">{{html .Path}}</a>
{{else}} {{else}}
{{$doc_html := docLink .Path .Name| html}} {{$doc_html := docLink .Path .Name| html}}
<a href="/{{$pkg_html}}">{{html .Package}}</a>.<a href="{{$doc_html}}">{{.Name}}</a> <a href="/{{$pkg_html}}">{{html .Package}}</a>.<a href="{{$doc_html}}">{{.Name}}</a>
{{end}} {{end}}
{{if .Doc}} {{if .Doc}}
<p>{{comment_html .Doc}}</p> <p>{{comment_html .Doc}}</p>
{{else}} {{else}}
<p><em>No documentation available</em></p> <p><em>No documentation available</em></p>
{{end}} {{end}}
{{end}} {{end}}
{{end}} {{end}}
{{end}} {{end}}
`, `,