讨论:倭使日記
跳到导航
跳到搜索
原文[编辑]
- 藏書閣版本:https://jsg.aks.ac.kr/dir/view?catePath=&dataId=JSG_K2-3492
- 奎章個版本:https://kyudb.snu.ac.kr/book/view.do?book_cd=GK16034_00
Blahhmosh(留言) 2022年6月28日 (二) 22:33 (UTC)
https://jsg.aks.ac.kr/viewer/viewTxt?dataId=K2-3492%7C001#node?dataId=ARC_23492_001_0001 (感谢 User:Blahhmosh) DuckSoft(留言) 2022年7月2日 (六) 13:49 (UTC)
原文格式清理脚本[编辑]
因原文格式复杂,直接复制浏览器网页内容会引起内容错位,故制此脚本,用时贴于浏览器之控制台即可。
document.querySelectorAll("span[data-xsl-tag='page']").forEach(i => i.parentNode.remove());
[".xsl_para", "span"].forEach(selector => document.querySelectorAll(selector).forEach(para => {
[].filter.call(para.childNodes, node => node.nodeName === "#text").forEach(node => {
let trimmed = node.textContent.trim();
if (trimmed.length === 0) node.remove();
else node.textContent = trimmed;
});
[].filter.call(para.childNodes, node => node.nodeName === "BR").forEach(node => node.remove());
}));
document.querySelectorAll("span[data-xsl-tag='kspace']").forEach(i => i.innerHTML = ' ');
document.querySelectorAll(".xsl_para_tit").forEach(i => {if (!/^== /.test(i.innerText)) i.innerText = `== ${i.innerText.trim()} ==`});
document.body.appendChild(document.createTextNode(`<!-- ${window.location} -->`))