MediaWiki:Minerva.js:修订间差异
MediaWiki界面页面
更多操作
无编辑摘要 |
无编辑摘要 |
||
| (未显示同一用户的1个中间版本) | |||
| 第71行: | 第71行: | ||
// 获取对应内容 | // 获取对应内容 | ||
const content = document.getElementById(contentId); | const content = document.getElementById(contentId); | ||
contentContainer.innerHTML = '<span style="font-size:1.5em; font-weight:bold;">' + contentId.slice(0, 3) + '</span>'; | |||
content.style.display = 'grid'; // 解除源内容的隐藏 | |||
var newContent = content.cloneNode(true); | var newContent = content.cloneNode(true); | ||
newContent.style.display = 'grid'; | newContent.style.display = 'grid'; | ||
contentContainer.appendChild(newContent); | contentContainer.appendChild(newContent); | ||
if (content.firstElementChild.getAttribute("rowspan") > 1) { | if (content.firstElementChild.getAttribute("rowspan") > 1) { | ||
const content2 = content.nextElementSibling; | |||
var newContent2 = content2.cloneNode(true); | |||
newContent2.style.display = 'grid'; | |||
contentContainer.appendChild(newContent2); | contentContainer.appendChild(newContent2); | ||
} | } | ||
if (content.firstElementChild.getAttribute("rowspan") > 2) { | if (content.firstElementChild.getAttribute("rowspan") > 2) { | ||
const content3 = content.nextElementSibling.nextElementSibling; | |||
var newContent3 = content3.cloneNode(true); | |||
newContent3.style.display = 'grid'; | |||
contentContainer.appendChild(newContent3); | contentContainer.appendChild(newContent3); | ||
} | } | ||