「MediaWiki:Common.js」の版間の差分

編集の要約なし
編集の要約なし
285行目: 285行目:


/* 折り畳みボックス用のJS */
/* 折り畳みボックス用のJS */
console.log("折り畳みボックスのスクリプトブロックが実行されようとしています。");
(function() {
(function() {
     // ページが完全に読み込まれた後に実行されるようにする
     // ページが完全に読み込まれた後に実行されるようにする
    console.log("AAAAAAAA: " + expandableBoxes);
     document.addEventListener('DOMContentLoaded', function() {
     document.addEventListener('DOMContentLoaded', function() {
         // 'custom-template-expandable-box' クラスを持つ要素をすべて取得
         // 'custom-template-expandable-box' クラスを持つ要素をすべて取得
         var expandableBoxes = document.querySelectorAll('.custom-template-expandable-box');
         var expandableBoxes = document.querySelectorAll('.custom-template-expandable-box');
         console.log(expandableBoxes);
         console.log("あああああああ: " + expandableBoxes);


         expandableBoxes.forEach(function(box) {
         expandableBoxes.forEach(function(box) {