미디어위키:Common.js: 두 판 사이의 차이
Resultofunion (토론 | 기여) 편집 요약 없음 |
Resultofunion (토론 | 기여) 편집 요약 없음 |
||
| 1번째 줄: | 1번째 줄: | ||
/ | //window.addEventListener('DOMContentLoaded', function() { | ||
// if (window.location.href.indexOf("action=tinymceedit") > -1) { | |||
// document.querySelector('.wikiEditor-ui-top').style.display = 'none'; | |||
// } | |||
//}); | |||
/* TOP 버튼 */ | /* TOP 버튼 */ | ||
| 23번째 줄: | 27번째 줄: | ||
} | } | ||
}); | }); | ||
/* 대문 섹션 토글 */ | |||
if(mw.config.get( 'wgPageName' ) == '대문' || mw.config.get( 'wgPageName' ) == '대문테스트'){ | |||
var titles = document.querySelectorAll('.cog-box-title'); | |||
for(var i=0; i<titles.length; i++){ | |||
titles[i].addEventListener('click', function(e){ | |||
if(e.currentTarget.classList.contains('open')){ | |||
e.currentTarget.classList.remove('open'); | |||
} else { | |||
e.currentTarget.classList.add('open'); | |||
} | |||
}); | |||
} | |||
} | |||