Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions playground/playground.go
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,7 +23,7 @@ type Line map[string]string

var output []Line

const snippetStoreHost = "snippets.gopherjs.org"
const snippetStoreHost = "https://snippets.gopherjs.org"

func main(){
var location = dom.GetWindow().Top().Location() // We might be inside an iframe, but want to use the location of topmost window.
Expand All@@ -36,7 +36,7 @@ func main(){
if strings.HasPrefix(location.Hash, "#/"){
id := location.Hash[2:]

req := xhr.NewRequest("GET", "http://"+snippetStoreHost+"/p/"+id)
req := xhr.NewRequest("GET", snippetStoreHost+"/p/"+id)
req.ResponseType = xhr.ArrayBuffer
go func(){
err := req.Send(nil)
Expand DownExpand Up@@ -230,7 +230,7 @@ func main(){
})

scope.Set("share", func(){
req := xhr.NewRequest("POST", "http://"+snippetStoreHost+"/share")
req := xhr.NewRequest("POST", snippetStoreHost+"/share")
req.ResponseType = xhr.ArrayBuffer
go func(){
err := req.Send([]byte(scope.Get("code").String())) // Send as binary.
Expand DownExpand Up@@ -266,7 +266,7 @@ func main(){
if strings.HasPrefix(location.Hash, "#/"){
id := location.Hash[2:]

req := xhr.NewRequest("GET", "http://"+snippetStoreHost+"/p/"+id)
req := xhr.NewRequest("GET", snippetStoreHost+"/p/"+id)
req.ResponseType = xhr.ArrayBuffer
go func(){
err := req.Send(nil)
Expand Down
2 changes: 1 addition & 1 deletion playground/playground.js

Large diffs are not rendered by default.