Anonym

MediaWiki:Common.js: Forskelle mellem versioner

Fra AarhusWiki
m
ingen redigeringsopsummering
mNo edit summary
mNo edit summary
Tag: Tilbagerullet
Linje 54: Linje 54:
   }
   }
});
});
// Function to adjust map container width on mobile devices
function adjustMapContainerWidth() {
  var mapContainer = document.querySelector('.tright > div');
  if (mapContainer) {
    var screenWidth = window.innerWidth;
    var maxWidth = (screenWidth <= 768) ? 350 : 600; // Adjust widths for mobile and iPad screens
    mapContainer.style.maxWidth = maxWidth + 'px';
  }
}
// Call the function on page load and when the screen is resized
document.addEventListener('DOMContentLoaded', adjustMapContainerWidth);
window.addEventListener('resize', adjustMapContainerWidth);