MediaWiki:Common.js

Jump to navigation Jump to search
No edit summary
No edit summary
Line 13: Line 13:


function tocIsHidden () {
function tocIsHidden () {
//    return !toc || !toggleLink || window.getComputedStyle(toc).display !== 'block';
}
}

Revision as of 19:02, 3 April 2021

/* Any JavaScript here will be loaded for all users on every page load. */

// collapse the TOC by default
var toc, toggleLink;

try {
  toc = document.getElementById('toc').getElementsByTagName('ul')[0];
  toggleLink = document.getElementById('toctogglecheckbox');
  toggleToc();
} catch (error) {
  console.log('erred', error);
}

function tocIsHidden () {
//    return !toc || !toggleLink || window.getComputedStyle(toc).display !== 'block';
}