blob: 15776cf7933b64e88f20af351cdfedff8c75d08a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
window.mapsLeafletList = [];
(function( $, mw ) {
mw.hook( 'wikipage.content' ).add( function ( $content ) {
$content.find( '.maps-leaflet' ).each( function() {
let $this = $( this );
let jqueryMap = $this.leafletmaps(
JSON.parse( $this.find( 'div.mapdata' ).text() )
);
window.mapsLeafletList.push(jqueryMap);
} );
} );
})( window.jQuery, window.mediaWiki );
|