Commit a48702eb authored by Andrew Gerrand's avatar Andrew Gerrand

doc: hide playground on front page if playground disabled

Fixes #5630.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12884046
parent 4a7a72b8
......@@ -117,15 +117,19 @@ function feedLoaded(result) {
}
window.initFuncs.push(function() {
// Set up playground.
playground({
"codeEl": "#learn .code",
"outputEl": "#learn .output",
"runEl": "#learn .run",
"shareEl": "#learn .share",
"shareRedirect": "http://play.golang.org/p/",
"toysEl": "#learn .toys select"
});
// Set up playground if enabled.
if (window.playground) {
window.playground({
"codeEl": "#learn .code",
"outputEl": "#learn .output",
"runEl": "#learn .run",
"shareEl": "#learn .share",
"shareRedirect": "http://play.golang.org/p/",
"toysEl": "#learn .toys select"
});
} else {
$('#learn').hide()
}
// Load blog feed.
$('<script/>').attr('text', 'text/javascript')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment