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

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




const subtitle = document.getElementById('mw-content-subtitle');
const intervalId = setInterval(() => {
 
  const subtitle = document.getElementById('mw-content-subtitle');
if (subtitle) {
 
  const childNodes = subtitle.childNodes;
  if (subtitle) {
  for (let i = 0; i < childNodes.length; i++) {
    const childNodes = subtitle.childNodes;
    const node = childNodes[i];
    for (const node of childNodes) {
    if (node.nodeType === Node.TEXT_NODE) {
      if (node.nodeType === Node.TEXT_NODE && node.textContent.trim().length > 0) {
      if (node.textContent.trim().length > 0) {
         subtitle.removeChild(node);
         subtitle.removeChild(node);
       }
       }
     }
     }
    clearInterval(intervalId);
   }
   }
}
}, 200);