(새 문서: →** 다크모드 감지 **: if (1) { var body = document.querySelector('body'); if ( 'rgb(0, 0, 0)' == window.getComputedStyle(body).backgroundColor) { body.classList.add('Liber...) |
편집 요약 없음 |
||
3번째 줄: | 3번째 줄: | ||
var body = document.querySelector('body'); | var body = document.querySelector('body'); | ||
if ( 'rgb(0, 0, 0)' == window.getComputedStyle(body).backgroundColor) { | if ( 'rgb(0, 0, 0)' == window.getComputedStyle(body).backgroundColor) { | ||
mw.loader.load('/index.php?title=사용자:Cerulean/liberty-dark.css&action=raw&ctype=text/css', 'text/css'); | |||
body.classList.add('Liberty-dark'); | body.classList.add('Liberty-dark'); | ||
} | } | ||
} | } |