MediaWiki:Wikiminiatlas.js: Difference between revisions
"typeof" is not a function, it is an operator (like "delete", "new" and "return"). Parentheses are pointless.
No edit summary |
("typeof" is not a function, it is an operator (like "delete", "new" and "return"). Parentheses are pointless.) |
||
Line 278: | Line 278: | ||
clist.lonright = coord_list[ineg].lon; | clist.lonright = coord_list[ineg].lon; | ||
} | } | ||
if( typeof | if( typeof JSON !== "undefined" ) { | ||
mes.postMessage( JSON.stringify(clist), document.location.protocol+'//toolserver.org' ); | mes.postMessage( JSON.stringify(clist), document.location.protocol + '//toolserver.org' ); | ||
if( kml !== null ) { | if( kml !== null ) { | ||
mes.postMessage( JSON.stringify(kml), document.location.protocol+'//toolserver.org' ); | mes.postMessage( JSON.stringify(kml), document.location.protocol + '//toolserver.org' ); | ||
} | } | ||
} | } | ||
Line 512: | Line 512: | ||
// already got a request message | // already got a request message | ||
if( mes !== null && kml.ways.length > 0 && typeof | if( mes !== null && kml.ways.length > 0 && typeof JSON !== "undefined" ) { | ||
mes.postMessage( JSON.stringify(kml), document.location.protocol+'//toolserver.org' ); | mes.postMessage( JSON.stringify(kml), document.location.protocol + '//toolserver.org' ); | ||
} | } | ||