ID:1817178
 
Resolved
The JavaScript shim used by browser controls had trouble with some instances where code contained carriage returns and script lines were not ended with semicolons.
BYOND Version:507
Operating System:Windows 7 Pro 64-bit
Web Browser:Chrome 41.0.2272.101
Applies to:Webclient
Status: Resolved (507.1280)

This issue has been resolved.
v1279

Descriptive Problem Summary:
Suddenly hitting unexpected token error.

...
Ready to begin play
1.html:3 Script error SyntaxError: Unexpected token )


When I click on the 1.html:3, it navigates me to the middle of this line in the web debugger which appears to have been injected into the head of my .html document so its the first thing to run and fail. It was working so I'm curious if we're picking up "dynamic" script changes you're making outside of the installed software.

<head><base href="http://23.99.84.35:8803/" /><script>(function(w){var by={fixjs:function(f){var m,l,s=f.toString(),i=s.indexOf('{')+1,j=s.lastIndexOf('}');s=s.substr(i,j-i).trim();var eos=function(s,a) {var m,i,j,k,a;if(!a) a=0;else s=s.substr(a);while((m=s.match(/[;\n\"\']/))) {if(m[0]==';'||m[0]=='\n') return a+m.index;for(k=m.index+1;k<s.length;) {if((i=s.indexOf(m[0],k))<0) break;if((j=s.indexOf('\\',k))<0||j>i) break;k=j+2;}s=s.substr(k=(i+1)||s.length); a+=k;}return a+s.length;};while((m=s.match(/((window|document)\.location(\.href)?\s*=\s*)/))){i=m.index;l=m[0].length;j=eos(s,i);s=s.substr(0,i)+'byond.go('+s.substr(i+l,j-i-l)+')'+s.substr(j);}try{w.eval(s);}catch(_){console.log('Script error '+_);}}};function redo(n,t) {setTimeout('byond.'+n+'('+JSON.stringify(t)+')', 100);}var by0=w.byond={topic: function(t){redo('topic',t);},msg: function(t){redo('msg',t);},go: function(t){redo('go',t);}};function reby(){for(var i in by) if(by.hasOwnProperty(i)) w.byond[i]=by[i];}reby();var b=function(e){if(b.o&&e.origin!=b.o)return;b.o=e.origin,b.s=e.source;if(!w.byond) return; try{w.eval(e.data);}catch(_){}if(w.byond.topic==by0.topic){w.byond.topic=function(t){b.s.postMessage('topic:'+t,'*');};reby();}if(w.byond.msg==by0.msg){w.byond.msg=function(t){b.s.postMessage(t,'*');};reby();}};w.addEventListener('message',b);w.parent.postMessage('browser','*');})(window);</script>

Code Snippet (if applicable) to Reproduce Problem:




Darn it, this didn't come up in my testing. There must be something about the particular document that it's choking on. Do you have an example case for this one?
Need live example or source code?
Seem's your game is still up :P

http://23.99.84.35:8803/play/

http://textdump.net/read/7038/

I didn't get the error though, Chrome (latest) nor latest FireFox.

Although I can't get past your logo? Not sure if that's on purpose or not :)

[EDIT] Nor IE 11 I did get this however, but it didn't stop me from seeing your Logo.

SCRIPT12030: WebSocket Error: Network Error 12030, The connection with the server was terminated abnormally
Not sure what the deal is there. Possible bug in access the webclient directly!?

Try going here:
http://www.poplava.com/DD.htm

You won't see any errors unless you're looking out the debug spew. Clicking on the tabs (Heroes, Store, and Something) don't work because the scripts fail to load.
[edit] - Just posted a new drop and restarted.

Source would be best so I can examine the document causing the issue. Plus I don't really hunt bugs this time of night, so it's better to be able to review the issue on my own schedule without relying on a live test.
Lummox JR resolved issue with message:
The JavaScript shim used by browser controls had trouble with some instances where code contained carriage returns and script lines were not ended with semicolons.