MediaWiki:Common.js: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
m Annullata la modifica 43958432 di Pap3rinik (discussione): consenso
Riga 774:
 
/** OpenStreetMap nel template Coord **/
 
/**
* Move the coordinates which are at the top of the page
* From fr:mediawiki:common.js
*/
function moveCoord() {
var h1 = document.getElementById('firstHeading');
if(!h1) h1 = document.getElementsByTagName('h1')[0]; // Nostalgia, Standard
var coord = document.getElementById('coordinates');
if ( !coord || !h1 ) return;
coord.id = "coordinates-title";
h1.parentNode.insertBefore(coord, h1); /* déplacement de l'élément */
}
addOnloadHook(moveCoord);
// Verwendung von OpenStreetMap in Wikipedia.
Riga 799 ⟶ 785:
function openStreetMap_Init () {
var c = document.getElementById ( 'coordinates-title' ) ;
if ( !c ) return ;
Riga 822 ⟶ 808:
function openStreetMap_Toggle () {
var c = document.getElementById ( 'coordinates-title' ) ;
if ( !c) return ;
var osm = document.getElementById ( 'OpenStreetMap' ) ;