@@ -23,7 +23,7 @@ type Line map[string]string
23
23
24
24
var output []Line
25
25
26
- const snippetStoreHost = "snippets.gopherjs.org"
26
+ const snippetStoreHost = "https:// snippets.gopherjs.org"
27
27
28
28
func main () {
29
29
var location = dom .GetWindow ().Top ().Location () // We might be inside an iframe, but want to use the location of topmost window.
@@ -36,7 +36,7 @@ func main() {
36
36
if strings .HasPrefix (location .Hash , "#/" ) {
37
37
id := location .Hash [2 :]
38
38
39
- req := xhr .NewRequest ("GET" , "http://" + snippetStoreHost + "/p/" + id )
39
+ req := xhr .NewRequest ("GET" , snippetStoreHost + "/p/" + id )
40
40
req .ResponseType = xhr .ArrayBuffer
41
41
go func () {
42
42
err := req .Send (nil )
@@ -230,7 +230,7 @@ func main() {
230
230
})
231
231
232
232
scope .Set ("share" , func () {
233
- req := xhr .NewRequest ("POST" , "http://" + snippetStoreHost + "/share" )
233
+ req := xhr .NewRequest ("POST" , snippetStoreHost + "/share" )
234
234
req .ResponseType = xhr .ArrayBuffer
235
235
go func () {
236
236
err := req .Send ([]byte (scope .Get ("code" ).String ())) // Send as binary.
@@ -266,7 +266,7 @@ func main() {
266
266
if strings .HasPrefix (location .Hash , "#/" ) {
267
267
id := location .Hash [2 :]
268
268
269
- req := xhr .NewRequest ("GET" , "http://" + snippetStoreHost + "/p/" + id )
269
+ req := xhr .NewRequest ("GET" , snippetStoreHost + "/p/" + id )
270
270
req .ResponseType = xhr .ArrayBuffer
271
271
go func () {
272
272
err := req .Send (nil )
0 commit comments