ചെക്ക് യൂസർമാർ, emailconfirmed, സമ്പർക്കമുഖ കാര്യനിർവാഹകർ, kiteuser, oversight, കാര്യനിർവാഹകർ, അപ്ലോഡ് സഹായി മേള തിരുത്തുന്നവർ
783
തിരുത്തലുകൾ
(ചെ.)No edit summary |
(ചെ.)No edit summary |
||
| വരി 3: | വരി 3: | ||
document.addEventListener("DOMContentLoaded", function () { | document.addEventListener("DOMContentLoaded", function () { | ||
// | // Create a MutationObserver to watch for changes in the DOM | ||
const observer = new MutationObserver(function (mutations) { | |||
mutations.forEach(function (mutation) { | |||
// Check if new nodes are added | |||
mutation.addedNodes.forEach(function (node) { | |||
// Ensure the node is an element and has the target class | |||
if (node.nodeType === 1 && node.matches('.leaflet-marker-pane img')) { | |||
const img = node; | |||
if (img.src === "https://tile.openstreetmap.org/v4/marker/pin-m+7e7e7e@2x.png") { | |||
// Replace the src attribute with the new URL | |||
img.src = "https://schoolwiki.in/extensions/Kartographer/lib/external/mapbox/images/marker-icon-2x.png"; | |||
} | |||
} | |||
}); | |||
}); | |||
}); | |||
// Start observing the body for added child elements | |||
observer.observe(document.body, { | |||
childList: true, | |||
subtree: true | |||
}); | }); | ||
}); | }); | ||
തിരുത്തലുകൾ