_content: fix go.dev/play share not to reload page

Mainly the JS invocation was set up wrong.

Also add the display box for the share URL back,
and style the share URL box and the Go release box
the same as the example selector box.

Also hide the example box when sharing.
This used to happen somewhat accidentally
on play.golang.org. Make it intentional.

Fixes golang/go#49766.

Change-Id: Ib297feff123f6fdabebe24cf868a54874c5afc83
Reviewed-on: https://go-review.googlesource.com/c/website/+/368014
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
diff --git a/_content/css/styles.css b/_content/css/styles.css
index b478ee5..77695f9 100644
--- a/_content/css/styles.css
+++ b/_content/css/styles.css
@@ -3832,7 +3832,7 @@
   gap: 0.5rem;
   justify-content: flex-end;
 }
-.Playground-selectExample {
+.Playground-selectExample, .Playground-selectGoVersion, .Playground-shareURL {
   background-color: white;
   border-radius: 3px;
   border: 0.0625rem solid #979797;
@@ -3857,7 +3857,7 @@
   .Playground-controls {
     flex-wrap: nowrap;
   }
-  .Playground-selectExample {
+  .Playground-selectExample, .Playground-selectGoVersion, .Playground-shareURL {
     margin: 0 0.4375rem 0 0;
     width: auto;
   }
diff --git a/_content/js/playground.js b/_content/js/playground.js
index 6f02e59..eb42c71 100644
--- a/_content/js/playground.js
+++ b/_content/js/playground.js
@@ -529,6 +529,9 @@
               .focus()
               .select();
 
+            if (opts.toysEl !== null) {
+              $(opts.toysEl).hide();
+            }
             if (rewriteHistory) {
               var historyData = { code: sharingData };
               window.history.pushState(historyData, '', path);
diff --git a/_content/js/playsite.js b/_content/js/playsite.js
index bd3dbab..b43b3ff 100644
--- a/_content/js/playsite.js
+++ b/_content/js/playsite.js
@@ -13,7 +13,7 @@
       "runEl":         ".js-playgroundRunEl",
       "fmtEl":         ".js-playgroundFmtEl",
       "shareEl":       ".js-playgroundShareEl",
-      "shareRedirect": "/play/p/",
+      "shareURLEl":    ".js-playgroundShareURLEl",
       "toysEl":        ".js-playgroundToysEl",
       "versionEl":     ".js-playgroundVersionEl",
       'enableHistory': true,
diff --git a/_content/play.tmpl b/_content/play.tmpl
index 6900d02..f7abe78 100644
--- a/_content/play.tmpl
+++ b/_content/play.tmpl
@@ -20,6 +20,7 @@
       <button id="share" class="Button js-playgroundShareEl" title="Share this code">Share</button>
       {{- end}}
     </div>
+    <input type="text" class="Playground-shareURL js-playgroundShareURLEl" title="Sharing URL" style="display: none;"></input>
     <select class="Playground-selectExample js-playgroundToysEl" aria-label="Code examples">
     <option value="hello.go">Hello, World!</option>
     <option value="life.go">Conway's Game of Life</option>