MediaWiki:Wikiminiatlas.js: Difference between revisions
make domain a variable (for labs switchover)
(cleanup) |
(make domain a variable (for labs switchover)) |
||
Line 211: | Line 211: | ||
'zh-cn': '调整大小' | 'zh-cn': '调整大小' | ||
} | } | ||
}, | }, | ||
// domain of the WMA | |||
wma_domain = '//toolserver.org'; | |||
// Get a specific, localized string | // Get a specific, localized string | ||
_msg = function(k) { | _msg = function(k) { | ||
Line 309: | Line 311: | ||
} | } | ||
if( typeof JSON !== "undefined" ) { | if( typeof JSON !== "undefined" ) { | ||
mes.postMessage( JSON.stringify(clist), document.location.protocol + | mes.postMessage( JSON.stringify(clist), document.location.protocol + wma_domain ); | ||
if( kml !== null ) { | if( kml !== null ) { | ||
mes.postMessage( JSON.stringify(kml), document.location.protocol + | mes.postMessage( JSON.stringify(kml), document.location.protocol + wma_domain ); | ||
} | } | ||
} | } | ||
Line 563: | Line 565: | ||
// already got a request message | // already got a request message | ||
if( mes !== null && kml.ways.length > 0 && typeof JSON !== "undefined" ) { | if( mes !== null && kml.ways.length > 0 && typeof JSON !== "undefined" ) { | ||
mes.postMessage( JSON.stringify(kml), document.location.protocol + | mes.postMessage( JSON.stringify(kml), document.location.protocol + wma_domain ); | ||
} | } | ||