1
0
mirror of https://github.com/golang/go synced 2024-11-24 23:17:57 -07:00

doc: hide playground on front page if playground disabled

Fixes #5630.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12884046
This commit is contained in:
Andrew Gerrand 2013-08-22 11:12:44 +10:00
parent 4a7a72b8c1
commit a48702eb39

View File

@ -117,8 +117,9 @@ function feedLoaded(result) {
} }
window.initFuncs.push(function() { window.initFuncs.push(function() {
// Set up playground. // Set up playground if enabled.
playground({ if (window.playground) {
window.playground({
"codeEl": "#learn .code", "codeEl": "#learn .code",
"outputEl": "#learn .output", "outputEl": "#learn .output",
"runEl": "#learn .run", "runEl": "#learn .run",
@ -126,6 +127,9 @@ window.initFuncs.push(function() {
"shareRedirect": "http://play.golang.org/p/", "shareRedirect": "http://play.golang.org/p/",
"toysEl": "#learn .toys select" "toysEl": "#learn .toys select"
}); });
} else {
$('#learn').hide()
}
// Load blog feed. // Load blog feed.
$('<script/>').attr('text', 'text/javascript') $('<script/>').attr('text', 'text/javascript')