User:かなで2号/global.js

document.addEventListener('DOMContentLoaded', function {    var tabTitles = document.querySelectorAll('.tabbernav [data-hash]');    var tabContents = document.querySelectorAll('.tabbertab[data-hash]'); //   Array.prototype.forEach.call(tabContents, function (tabContent, i) { //    tabContent.dataset.beforeDisplay = tabContent.style.display; //    if (hash) { //      if (hash !== ('#' + tabContent.dataset.customTabContents)) //        tabContent.style.display = 'none'; //    } else { //      if (i > 0) //        tabContent.style.display = 'none'; //    } //   });    Array.prototype.forEach.call(tabTitles, function (tabTitle) { tabTitle.dataset.hash = decodeURIComponent(tabTitle.dataset.hash.replace(/\./g,'%')); // var tabId = tabTitle.dataset.customTabId; // var selectContents = document.querySelectorAll('[data-custom-tab-contents="' + tabId + '"]'); // tabTitle.addEventListener('click', function {        //     window.history.replaceState(, , '#' + tabId);        //     Array.prototype.forEach.call(tabContents, function (tabContent) { //        tabContent.style.display = 'none'; //    });        //     Array.prototype.forEach.call(selectContents, function (selectContent) { //        selectContent.style.display = selectContent.dataset.beforeDisplay; //    });        // });    }); });