blob: 8a7b9b491b8e25344553716c545ba6e726b1a6f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
window.mapsGoogleList = [];
(function( $, mw ) {
mw.hook( 'wikipage.content' ).add( function ( $content ) {
if( typeof google === 'undefined' ) {
$content.find( '.maps-googlemaps3' ).text( mw.msg( 'maps-googlemaps3-incompatbrowser' ) );
} else {
$content.find( '.maps-googlemaps3' ).each( function() {
var $this = $( this );
window.mapsGoogleList.push(
$this.googlemaps( JSON.parse( $this.find( 'div.mapdata' ).text() ) )
);
} );
}
} );
})( window.jQuery, window.mediaWiki );
|