미디어위키:Common.js: 두 판 사이의 차이
Resultofunion (토론 | 기여) 편집 요약 없음 |
Resultofunion (토론 | 기여) 편집 요약 없음 |
||
| 98번째 줄: | 98번째 줄: | ||
mutationList.forEach(function(mutation){ | mutationList.forEach(function(mutation){ | ||
console.log(mutation); | console.log(mutation); | ||
mutation.addedNodes.forEach(function (node) { | |||
if (node.classList && node.classList.contains('mwe-popups')) { | |||
requestAnimationFrame(function () { | |||
var bodyLeft = document.body.getBoundingClientRect().left; | |||
var left = parseInt(window.getComputedStyle(node).left); | |||
node.style.left = left - bodyLeft + 'px'; | |||
} | }); | ||
} | |||
}) | |||
}) | }) | ||
}) | }) | ||