"മീഡിയവിക്കി:Common.js" എന്ന താളിന്റെ പതിപ്പുകൾ തമ്മിലുള്ള വ്യത്യാസം

No edit summary
(ചെ.)No edit summary
വരി 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://maps.wikimedia.org");
         var newSrc = oldSrc.replace("https://tile.openstreetmap.org/v4/marker/", "https://schoolwiki.in/File:");
          
          
         markerImages[i].src = newSrc;
         markerImages[i].src = newSrc;
"https://schoolwiki.in/മീഡിയവിക്കി:Common.js" എന്ന താളിൽനിന്ന് ശേഖരിച്ചത്