From 19c96be7c450e3dff3797cb1e458414c15010358 Mon Sep 17 00:00:00 2001 From: Chris Broadfoot Date: Tue, 7 Feb 2017 10:29:28 -0800 Subject: [PATCH] static: fix playground share Change-Id: I5decba3efb750e32fbc07ac1093cd37a00b65912 Reviewed-on: https://go-review.googlesource.com/36488 Reviewed-by: Chris Broadfoot --- godoc/static/playground.js | 4 +++- godoc/static/static.go | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/godoc/static/playground.js b/godoc/static/playground.js index 66d0dc44..bea9c4b6 100644 --- a/godoc/static/playground.js +++ b/godoc/static/playground.js @@ -440,7 +440,9 @@ function PlaygroundOutput(el) { if (opts.shareURLEl) { shareURL = $(opts.shareURLEl).hide(); } - $(opts.shareEl).click(share); + $(opts.shareEl).click(function() { + share(); + }); } if (opts.toysEl !== null) { diff --git a/godoc/static/static.go b/godoc/static/static.go index 6478a9af..b2e56f9d 100644 --- a/godoc/static/static.go +++ b/godoc/static/static.go @@ -2650,7 +2650,9 @@ function PlaygroundOutput(el) { if (opts.shareURLEl) { shareURL = $(opts.shareURLEl).hide(); } - $(opts.shareEl).click(share); + $(opts.shareEl).click(function() { + share(); + }); } if (opts.toysEl !== null) {