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) {