MediaWiki:Common.js: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| 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. */ | ||
mw.hook('wikipage.maps').add(function () { | mw.hook('wikipage.maps').add(function () { | ||
mw.util.addCSS('.leaflet-marker-icon { margin-left:-16 !important; margin-top:-16 !important; width: 32px !important; height: | mw.util.addCSS('.leaflet-marker-icon { margin-left:-16 !important; margin-top:-16 !important; width: 32px !important; height: 52px !important; }'); | ||
new MutationObserver(function (mutations) { | new MutationObserver(function (mutations) { | ||
mutations.forEach(function (mutation) { | mutations.forEach(function (mutation) { | ||
Revision as of 21:03, 22 July 2026
/* Any JavaScript here will be loaded for all users on every page load. */
mw.hook('wikipage.maps').add(function () {
mw.util.addCSS('.leaflet-marker-icon { margin-left:-16 !important; margin-top:-16 !important; width: 32px !important; height: 52px !important; }');
new MutationObserver(function (mutations) {
mutations.forEach(function (mutation) {
if (mutation.addedNodes.length) {
mutation.addedNodes[0].src = "https://relaxed-feynman.74-208-238-145.plesk.page/w/images/8/8f/Marker.png";
}
});
}).observe($('.leaflet-marker-pane').get(0), {
childList: true,
});
});