MediaWiki:Minerva.js:修订间差异
MediaWiki界面页面
更多操作
无编辑摘要 标签:移动版编辑 移动版网页编辑 高级移动版编辑 |
无编辑摘要 |
||
| 第73行: | 第73行: | ||
const content2 = content.nextElementSibling; | const content2 = content.nextElementSibling; | ||
const content3 = content2.nextElementSibling; | const content3 = content2.nextElementSibling; | ||
var newContent = content.cloneNode(true); | |||
var newContent2 = content2.cloneNode(true); | |||
var newContent3 = content3.cloneNode(true); | |||
content.style.display = 'grid'; // 解除源内容的隐藏 | content.style.display = 'grid'; // 解除源内容的隐藏 | ||
// 清空旧内容并插入新内容 | // 清空旧内容并插入新内容 | ||
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>'; | ||
contentContainer.appendChild( | contentContainer.appendChild(newContent); | ||
if (content.firstElementChild.getAttribute("rowspan") > 1) { | if (content.firstElementChild.getAttribute("rowspan") > 1) { | ||
contentContainer.appendChild( | contentContainer.appendChild(newContent2); | ||
} | } | ||
if (content.firstElementChild.getAttribute("rowspan") > 2) { | if (content.firstElementChild.getAttribute("rowspan") > 2) { | ||
contentContainer.appendChild( | 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>' | ||
} | } | ||