arXiv:自动展开折叠区块
自动展开 Comments、MSC class 和 Keywords 折叠区块,立刻显示全部论文元数据。
可复制的代码
// Auto-expand collapsed sections (Comments, MSC class, ACM class)
(function () {
function expand() {
document.querySelectorAll('details:not([open])').forEach(function (d) {
d.open = true;
});
document.querySelectorAll('.comments, .msc-classes, .acm-classes, .keywords').forEach(function (el) {
el.style.display = 'block';
el.removeAttribute('hidden');
});
document.querySelectorAll('a, button').forEach(function (el) {
if (el.dataset.jzArxExp) { return; }
var t = (el.textContent || '').toLowerCase().trim();
if (/^(show|expand|view|more) (comments|details|metadata)/.test(t)) {
el.dataset.jzArxExp = '1';
el.click();
}
});
}
expand();
new MutationObserver(function () {
clearTimeout(window.__jzArxExp);
window.__jzArxExp = setTimeout(expand, 350);
}).observe(document.body, { childList: true, subtree: true });
})();
如何使用此示例
- 用上方按钮复制代码。
- 安装 JustZix(2 分钟),在目标页面打开扩展。
- 添加一条匹配该页面的新规则。
- 将代码粘贴到规则的 JavaScript 面板并保存 — 每次访问页面时都会运行。
为此示例评分
暂无评分 — 成为第一个。