미디어위키:Common.js: 두 판 사이의 차이
Resultofunion (토론 | 기여) 편집 요약 없음 |
Resultofunion (토론 | 기여) 편집 요약 없음 |
||
| 94번째 줄: | 94번째 줄: | ||
/* 각주 팝업창 위치 보정 */ | /* 각주 팝업창 위치 보정 */ | ||
var observer = new MutationObserver(function (mutationList){ | |||
console.log('observer'); | |||
mutationList.forEach(function(mutation){ | |||
console.log(mutation); | |||
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'; | |||
}); | |||
} | |||
} | }) | ||
}) | |||
observer.observe(document.body, { | |||
) | childList:true, | ||
subtree:true | |||
}) | |||
/* 우클릭 방지 */ | /* 우클릭 방지 */ | ||