Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
LGTM On Wed, Aug 21, 2013 at 6:10 PM, <adg@golang.org> wrote: > Reviewers: golang-dev1, > > Message: > Hello golang-dev@googlegroups.com, > > I'd like you to review this change to > https://code.google.com/p/go > > > Description: > doc: hide playground on front page if playground disabled > > Fixes issue 5630. > > Please review this at https://codereview.appspot.**com/12884046/<https://codereview.appspot.com/128... > > Affected files: > M doc/root.html > > > Index: doc/root.html > ==============================**==============================**======= > --- a/doc/root.html > +++ b/doc/root.html > @@ -117,15 +117,19 @@ > } > > 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') > > > -- > > ---You received this message because you are subscribed to the Google > Groups "golang-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-dev+unsubscribe@**googlegroups.com<golang-dev%2Bunsubscribe@googlegrou... > . > For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/o... > . >
*** Submitted as https://code.google.com/p/go/source/detail?r=c0c0d93731c6 *** doc: hide playground on front page if playground disabled Fixes issue 5630. R=golang-dev, bradfitz CC=golang-dev https://codereview.appspot.com/12884046