|
|
|
go.talks/present: make js use correct websocket address
This makes the client connect to the host from which it's being served,
rather than being hardcoded to localhost:3999.
Right now, if you try to run with -http set to any port other than
3999, you'll get websocket closed as soon as you open the presentation.
Patch Set 1 #Patch Set 2 : diff -r 4bd876a6faad https://code.google.com/p/go.talks/ #Patch Set 3 : diff -r 4bd876a6faad https://code.google.com/p/go.talks/ #Total messages: 3
|
cespare
Hello golang-dev@googlegroups.com (cc: adg@golang.org), I'd like you to review this change to https://code.google.com/p/go.talks/
|
12 years, 9 months ago (2013年03月20日 00:40:50 UTC) #1 |
Hello golang-dev@googlegroups.com (cc: adg@golang.org), I'd like you to review this change to https://code.google.com/p/go.talks/
*** Submitted as https://code.google.com/p/go/source/detail?r=6ccd835b48d9&repo=talks *** go.talks/present: make js use correct websocket address This makes the client connect to the host from which it's being served, rather than being hardcoded to localhost:3999. Right now, if you try to run with -http set to any port other than 3999, you'll get websocket closed as soon as you open the presentation. R=golang-dev CC=adg, golang-dev https://codereview.appspot.com/7829046 Committer: Andrew Gerrand <adg@golang.org>
LGTM I'm sure I fixed this before. Weird. On 19 March 2013 17:40, <cespare@gmail.com> wrote: > Reviewers: golang-dev1, > > Message: > Hello golang-dev@googlegroups.com (cc: adg@golang.org), > > I'd like you to review this change to > https://code.google.com/p/go.**talks/<https://code.google.com/p/go.talks/> > > > Description: > go.talks/present: make js use correct websocket address > > This makes the client connect to the host from which it's being served, > rather than being hardcoded to localhost:3999. > > Right now, if you try to run with -http set to any port other than > 3999, you'll get websocket closed as soon as you open the presentation. > > Please review this at https://codereview.appspot.**com/7829046/<https://codereview.appspot.com/7829... > > Affected files: > M present/js/play.js > > > Index: present/js/play.js > ==============================**==============================**======= > --- a/present/js/play.js > +++ b/present/js/play.js > @@ -40,7 +40,7 @@ > stopFunc(); > } > } > - > + > function onRun() { > onKill(); > outpre.innerHTML = ""; > @@ -97,7 +97,7 @@ > } > if (play.length > 0) { > if (window.connectPlayground) { > - runFunc = window.connectPlayground("ws:/**/localhost:3999/socket"); > + runFunc = window.connectPlayground("ws:/**/" + > window.location.host + "/socket"); > } else { > // If this message is logged, > // we have neglected to include socket.js or playground.js. > > >