「MediaWiki:Common.js」の版間の差分
MediaWikiインターフェイスページ
その他の操作
編集の要約なし |
|||
| 2行目: | 2行目: | ||
const subtitle = document.getElementById('mw-content-subtitle'); | |||
if ( | if (subtitle) { | ||
const childNodes = subtitle.childNodes; | |||
for (let i = 0; i < childNodes.length; i++) { | |||
const node = childNodes[i]; | |||
if (node.nodeType === Node.TEXT_NODE) { | |||
if (node.textContent.trim().length > 0) { | |||
subtitle.removeChild(node); | |||
} | |||
} | } | ||
} | |||
} | } | ||
2025年8月7日 (木) 23:58時点における版
/* ここにあるすべてのJavaScriptは、すべてのページ読み込みですべての利用者に対して読み込まれます */
const subtitle = document.getElementById('mw-content-subtitle');
if (subtitle) {
const childNodes = subtitle.childNodes;
for (let i = 0; i < childNodes.length; i++) {
const node = childNodes[i];
if (node.nodeType === Node.TEXT_NODE) {
if (node.textContent.trim().length > 0) {
subtitle.removeChild(node);
}
}
}
}