MediaWiki:Minerva.js: diferenças entre revisões
Sem resumo de edição Etiqueta: Revertida |
Sem resumo de edição Etiqueta: Reversão manual |
||
| Linha 29: | Linha 29: | ||
openList(this, 'recommended-open'); | openList(this, 'recommended-open'); | ||
}); | }); | ||
document.querySelector('#p-main-categories .title-category').addEventListener('click', function ( | document.querySelector('#p-main-categories .title-category').addEventListener('click', function () { | ||
openList(this, 'category-open'); | openList(this, 'category-open'); | ||
}); | }); | ||
| Linha 48: | Linha 48: | ||
} | } | ||
/ | // 유튜브 썸네일 | ||
var $ | document.querySelectorAll('iframe').forEach(function(iframe){ | ||
if($ | 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(); | |||
} | |||
}); | |||
}); | |||
}); | |||