MediaWiki:Minerva.js:修订间差异
MediaWiki界面页面
更多操作
无编辑摘要 标签:移动版编辑 移动版网页编辑 高级移动版编辑 |
无编辑摘要 |
||
| (未显示同一用户的5个中间版本) | |||
| 第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>'; | 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); | |||
newContent.style.display = 'grid'; | |||
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); | |||
} | } | ||
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); | |||
} | } | ||
if (content.firstElementChild.nextElementSibling.getAttribute("colspan") == 12) { | if (content.firstElementChild.nextElementSibling.getAttribute("colspan") == 12) { | ||
contentContainer.innerHTML = '<center><span style="font-size:1.5em; font-weight:bold;">' + contentId.slice(0, 3) + '<br/><br/>' + content.firstElementChild.innerHTML + '</span><br/><br/>' + content.firstElementChild.nextElementSibling.innerHTML; + '<center>' | contentContainer.innerHTML = '<center><span style="font-size:1.5em; font-weight:bold;">' + contentId.slice(0, 3) + '<br/><br/>' + content.firstElementChild.innerHTML + '</span><br/><br/>' + content.firstElementChild.nextElementSibling.innerHTML; + '</center>' | ||
} | } | ||