mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-08-01 04:17:53 +08:00
18 lines
593 B
HTML
18 lines
593 B
HTML
<script type="text/javascript">
|
|
document.addEventListener("DOMContentLoaded", function () {
|
|
setTimeout(updateElements, 200);
|
|
function updateElements() {
|
|
//删除控件和说明之间的多余换行
|
|
document.querySelectorAll("div.cbi-value-description").forEach(function(descDiv) {
|
|
var prev = descDiv.previousSibling;
|
|
while (prev && prev.nodeType === Node.TEXT_NODE && prev.textContent.trim() === "") {
|
|
prev = prev.previousSibling;
|
|
}
|
|
if (prev && prev.nodeType === Node.ELEMENT_NODE && prev.tagName === "BR") {
|
|
prev.remove();
|
|
}
|
|
});
|
|
}
|
|
});
|
|
</script>
|