사용자:하늘/liberty.js: 두 판 사이의 차이

(새 문서: →‎** 다크모드 감지 **: 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');
}
}
}
}

2022년 2월 6일 (일) 12:14 판

/*** 다크모드 감지 ***/
if (1) {
	var body = document.querySelector('body');
	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');
	}
}