Difference between revisions of "MediaWiki:Common.js"

From AltMap Beta
Line 1: Line 1:
 
/* Any JavaScript here will be loaded for all users on every page load. */
 
/* Any JavaScript here will be loaded for all users on every page load. */
  
function sample() {
+
function invertMap() {
 
       mapsLeafletList[0].map.setBearing(180);
 
       mapsLeafletList[0].map.setBearing(180);
 
}
 
}
  
 
if(window.location.href.indexOf("Index") > -1) {
 
if(window.location.href.indexOf("Index") > -1) {
   setTimeout(sample, 100);
+
   setTimeout(invertMap, 500);
 
}
 
}

Revision as of 14:30, 3 November 2021

/* Any JavaScript here will be loaded for all users on every page load. */

function invertMap() {
       mapsLeafletList[0].map.setBearing(180);
}

if(window.location.href.indexOf("Index") > -1) {
  setTimeout(invertMap, 500);
}