|
|
| (एउटा मध्यवर्ती संशोधन उही प्रयोगकर्ताद्वारा देखाइएको छैन) |
| पङ्क्ति १: |
पङ्क्ति १: |
| /* All JavaScript here will be loaded for users of the MinervaNeue skin */
| | mw.loader.load('/resources/assets/common/minerva.js'); |
| function wikiLink(title) {
| |
| // 공백 → _ 치환 후 절대 경로 생성
| |
| return mw.config.get('wgServer') + '/ne/' + title.replace(/ /g, '_');
| |
| }
| |
| | |
| document
| |
| .querySelector('#mw-mf-page-left #p-navigation')
| |
| .insertAdjacentHTML(
| |
| 'afterend',
| |
| '<ul id="p-main-categories" class="recommended-open">' +
| |
| '<li class="title-recommended open"><a><span>सिफारिस गरिएका कागजात</span></a><span class="ico-arrow"></span></li>' +
| |
| '<li class="recommended"><a href="' + wikiLink("परमेश्वरको मण्डली विश्व सुसमाचार समाज") + '"><span>परमेश्वरको मण्डली (कागजात)</span></a></li>' +
| |
| '<li class="recommended"><a href="' + wikiLink("आन साङ होङ") + '"><span>ख्रीष्ट आन साङ होङज्यू</span></a></li>' +
| |
| '<li class="recommended"><a href="' + wikiLink("माता परमेश्वर") + '"><span>माता परमेश्वर</span></a></li>' +
| |
| '<li class="recommended"><a href="' + wikiLink("शबाथ-दिन") + '"><span>शबाथ-दिन</span></a></li>' +
| |
| '<li class="recommended"><a href="' + wikiLink("निस्तार-चाड") + '"><span>निस्तार-चाड</span></a></li>' +
| |
| '<li class="recommended"><a href="' + wikiLink("सुसमाचार र नयाँ करार") + '"><span>सुसमाचार र नयाँ करार</span></a></li>' +
| |
| '<li class="title-category"><a><span>विधाअनुसार खोजी</span></a><span class="ico-arrow"></span></li>' +
| |
| '<li class="category"><a href="' + wikiLink("Category:परमेश्वरको मण्डली") + '"><span>परमेश्वरको मण्डली</span></a></li>' +
| |
| '<li class="category"><a href="' + wikiLink("Category:पिता परमेश्वर") + '"><span>पिता परमेश्वर</span></a></li>' +
| |
| '<li class="category"><a href="' + wikiLink("Category:माता परमेश्वर") + '"><span>माता परमेश्वर</span></a></li>' +
| |
| '<li class="category"><a href="' + wikiLink("Category:नयाँ करार सुसमाचार") + '"><span>नयाँ करार सुसमाचार</span></a></li>' +
| |
| '<li class="category"><a href="' + wikiLink("Category:बाइबलीय ज्ञान") + '"><span>बाइबलीय ज्ञान</span></a></li>' +
| |
| '<li class="category"><a href="' + wikiLink("Category:बाइबलीय मुद्दा") + '"><span>बाइबलीय मुद्दा</span></a></li>' +
| |
| '<li class="category"><a href="' + wikiLink("Category:सामाजिक योगदान") + '"><span>सामाजिक योगदान</span></a></li>' +
| |
| '<li class="category"><a href="' + wikiLink("Category:ग्लोबल सहकारिता") + '"><span>ग्लोबल सहकारिता</span></a></li>' +
| |
| '</ul>'
| |
| );
| |
|
| |
| document.querySelector('#p-main-categories .title-recommended').addEventListener('click', function () {
| |
| openList(this, 'recommended-open');
| |
| });
| |
| document.querySelector('#p-main-categories .title-category').addEventListener('click', function () {
| |
| openList(this, 'category-open');
| |
| });
| |
| | |
| function openList(titleLi, listClass) {
| |
| var list = document.querySelector('#p-main-categories');
| |
| if (list.classList.contains(listClass)) {
| |
| list.classList.remove(listClass);
| |
| } else {
| |
| list.classList.add(listClass);
| |
| }
| |
| | |
| if (titleLi.classList.contains('open')) {
| |
| titleLi.classList.remove('open');
| |
| } else {
| |
| titleLi.classList.add('open');
| |
| }
| |
| }
| |
| | |
| // 유튜브 썸네일
| |
| document.querySelectorAll('iframe').forEach(function(iframe){
| |
| iframe.parentElement.classList.add('video-wrap');
| |
| });
| |
| mw.loader.using(['jquery']).then(function() { | |
| $(function() {
| |
| var modal = $('#myLayer');
| |
| var btn = $('#selectLanguage'); // jQuery 선택자 사용
| |
| var span = $('.close-button').first();
| |
| | |
| btn.click(function() {
| |
| modal.show();
| |
| });
| |
| | |
| span.click(function() {
| |
| modal.hide();
| |
| });
| |
| | |
| $(window).click(function(event) {
| |
| if ($(event.target).is(modal)) {
| |
| modal.hide();
| |
| }
| |
| });
| |
| });
| |
| });
| |
| /* ------------------------------- | |
| * 모바일 언어 메뉴 삽입
| |
| * ------------------------------- */
| |
| mw.loader.using(['jquery']).then(function() {
| |
| $(function() {
| |
| var modal = $('#myLayer');
| |
| var btn = $('#selectLanguage');
| |
| var span = $('.close-button').first();
| |
| | |
| btn.click(function() {
| |
| modal.show();
| |
| });
| |
| | |
| span.click(function() {
| |
| modal.hide();
| |
| });
| |
| | |
| $(window).click(function(event) {
| |
| if ($(event.target).is(modal)) {
| |
| modal.hide();
| |
| }
| |
| });
| |
| | |
| if ( mw.config.get('skin') === 'minerva' ) {
| |
| var langHTML = ''
| |
| + '<ul id="mobile-language" class="recommended-open">'
| |
| + '<li><a href="https://churchofgod.wiki">한국어 (कोरियाली)</a></li>'
| |
| + '<li><a href="https://churchofgod.wiki/en">English (अङ्ग्रेजी)</a></li>'
| |
| + '<li><a href="https://churchofgod.wiki/es">Español (स्पेनी)</a></li>'
| |
| + '<li><a href="https://churchofgod.wiki/vi">Tiếng Việt (भियतनामी)</a></li>'
| |
| + '<li><a href="https://churchofgod.wiki/pt">Português (पोर्तुगीज)</a></i>'
| |
| + '</ul>';
| |
| var $list = $('#mobile-language');
| |
| $list.html(langHTML);
| |
| }
| |
| });
| |
| });
| |