MediaWiki:Wikiminiatlas.js: Difference between revisions

m (rm debug log)
(← Migration 1.17+: wg*mw.config.get('wg*'), -<pre> (doesn't do anything), <pre> is default on .js pages)
Line 1: Line 1:
// [[File:Erioll_world.svg|18px]] '''WikiMiniAtlas''' <br>
// [[File:Erioll_world.svg|18px]] '''WikiMiniAtlas''' <br>
// Script to embed interactive maps into pages that have coordinate templates <br>
// Script to embed interactive maps into pages that have coordinate templates <br>
// also check my user page [[User:Dschwen]] for more tools<pre>
// also check my user page [[User:Dschwen]] for more tools
// <nowiki>
//
//
// Revision 16.3
// Revision 16.3
Line 169: Line 170:
  iframe = { div: null, iframe: null, closebutton: null, resizebutton: null, resizehelper: null, indom: false },
  iframe = { div: null, iframe: null, closebutton: null, resizebutton: null, resizehelper: null, indom: false },
   
   
  page_title = (wgNamespaceNumber==0) ? encodeURIComponent(wgTitle) : '',
  page_title = (mw.config.get( 'wgNamespaceNumber' )==0) ? encodeURIComponent(mw.config.get( 'wgTitle' )) : '',


  bodyc,
  bodyc,
Line 328: Line 329:


  site = ( wgNoticeProject == "commons" ) ? "commons" : wgPageContentLanguage;
  site = ( wgNoticeProject == "commons" ) ? "commons" : wgPageContentLanguage;
  language = wgUserLanguage;
  language = mw.config.get( 'wgUserLanguage' );


  // remove icons from title coordinates
  // remove icons from title coordinates
Line 438: Line 439:
     ,ex,ey;
     ,ex,ey;
   for( i = 0; i < l.length; ++i ) {
   for( i = 0; i < l.length; ++i ) {
   if( l[i].href === 'http://en.wikipedia.org/w/index.php?title=Template:Attached_KML/'+wgPageName+'&action=raw' ) {
   if( l[i].href === 'http://en.wikipedia.org/w/index.php?title=Template:Attached_KML/'+mw.config.get( 'wgPageName' )+'&action=raw' ) {
     $.ajax({
     $.ajax({
     url: l[i].href,
     url: l[i].href,
Line 630: Line 631:
});
});


//</pre>
// </nowiki>