MediaWiki:Common.js: Difference between revisions
No edit summary |
No edit summary |
||
| Line 84: | Line 84: | ||
}); | }); | ||
} | } | ||
if (e.target.classList && e.target.classList.contains('mwe-popups')){ | |||
requestAnimationFrame(function () { | |||
document.querySelectorAll('.cog-box-inner a').forEach(link => { | |||
link.addEventListener('mouseover', function(event) { | |||
var parentBox = this.closest('.cog-box-inner'); | |||
console.log(parentBox); | |||
if (parentBox) { | |||
var rect = parentBox.getBoundingClientRect(); | |||
console.log('Element position: ', rect); | |||
} | |||
}); | |||
}); | |||
}); | |||
} | |||
}, | }, | ||
false | false | ||