_content: fix go.dev/play not to select example on load

This commit is contained in:
Zeke Lu 2022-05-19 15:31:29 +08:00
Родитель 9faf03bf18
Коммит dc930974e3
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -4,7 +4,7 @@
// for /play; play.js is for embedded play widgets
window.addEventListener('DOMContentLoaded', () => {
window.addEventListener('load', () => {
// Set up playground if enabled.
if (window.playground) {
window.playground({
@ -23,7 +23,7 @@ window.addEventListener('DOMContentLoaded', () => {
// The pre matched below is added by the code above. Style it appropriately.
document.querySelector(".js-playgroundOutputEl pre").classList.add("Playground-output");
$('.js-playgroundToysEl').val("hello.go").trigger("change")
$('.js-playgroundRunEl').click();
$('#code').linedtextarea();
$('#code').attr('wrap', 'off');