)]}' { "commit": "09b9c2003e15b27b236be9790b637f70fd4ba31a", "tree": "9828a9dc57d205d1e2c37ba52476f90c377be6b2", "parents": [ "f66592d15035691766490ce96a662860e1ad18fc" ], "author": { "name": "Zeke Lu", "email": "lvzecai@gmail.com", "time": "Tue May 24 16:26:41 2022 +0000" }, "committer": { "name": "Jamal Carvalho", "email": "jamal@golang.org", "time": "Tue May 24 16:45:29 2022 +0000" }, "message": "_content: fix go.dev/play not to select example on load\n\nSelect the \"hello.go\" example on load will make it run.\nBut it will overwrite the source code that a user want to restore\nby reopening the unintentionally closed tab from the browser history.\n\nSince the example code is already loaded without the select action,\nlet\u0027s remove the select action and trigger the click event of the Run\nbutton directly.\n\nNote that we should replace the \"DOMContentLoaded\" event with\nthe \"load\" event. Otherwise, the click event will be triggered before\nthe user content is restored, which will prevent the user content\nbeing restored.\n\nFixes golang/go#49895\n\nChange-Id: I897e22a5accc3271deaea5fa3b2f218fe66603d3\nGitHub-Last-Rev: dc930974e350ecaeb82cc6822d818c6a326a4576\nGitHub-Pull-Request: golang/website#161\nReviewed-on: https://go-review.googlesource.com/c/website/+/407055\nReviewed-by: Jamal Carvalho \u003cjamal@golang.org\u003e\nReviewed-by: Bryan Mills \u003cbcmills@google.com\u003e\n", "tree_diff": [ { "type": "modify", "old_id": "b43b3ff72e9f9fc8089ebf5b3b04c197c6f962a4", "old_mode": 33188, "old_path": "_content/js/playsite.js", "new_id": "911cc89cb5afd91fec7d1f8a56e11c2cc312a4a4", "new_mode": 33188, "new_path": "_content/js/playsite.js" } ] }