"മീഡിയവിക്കി:Common.js" എന്ന താളിന്റെ പതിപ്പുകൾ തമ്മിലുള്ള വ്യത്യാസം
No edit summary റ്റാഗ്: Reverted |
(ചെ.)No edit summary റ്റാഗ്: Reverted |
||
| വരി 3: | വരി 3: | ||
window.onload = function() { | window.onload = function() { | ||
// Find all images with a source that starts with "https://tile.openstreetmap.org" | // Find all images with a source that starts with "https://tile.openstreetmap.org" | ||
var markerImages = document.querySelectorAll('img[src^="https://tile.openstreetmap.org"]'); | var markerImages = document.querySelectorAll('img[src^="https://tile.openstreetmap.org/v4/marker/"]'); | ||
// Loop through the images and replace the base URL | // Loop through the images and replace the base URL | ||
| വരി 10: | വരി 10: | ||
// Replace "https://tile.openstreetmap.org" with "https://maps.wikimedia.org" | // Replace "https://tile.openstreetmap.org" with "https://maps.wikimedia.org" | ||
var newSrc = oldSrc.replace("https://tile.openstreetmap.org", "https:// | var newSrc = oldSrc.replace("https://tile.openstreetmap.org/v4/marker/", "https://schoolwiki.in/File:"); | ||
markerImages[i].src = newSrc; | markerImages[i].src = newSrc; | ||