提升组卷网的使用体验(三):提升试题清晰度 发表于 2023-12-23 更新于 2024-04-04 阅读次数: 本文旨在教您如何在不过分破费的情况下提升组卷网的使用体验。 不同的图片差异有多大 原始 优化后 *.png *.svg 1.96 KB 13.1 KB 原始 优化后 *.png?resizew=* *.png 4.42 KB 18.9 KB code1234567891011121314151617function normalize_q(dom) { const ool = dom ool.querySelectorAll("img").forEach(v => { if (v.src.includes("/formula/")) { v.src = v.src.replace(".png", ".svg") } if (v.src.includes("/dksih/")) { let tmp = /\?resizew=(\d*)/.exec(v.src) if (tmp.length != 0) { v.style.width = tmp[1] + "px" v.src = v.src.replace(/\?resizew=(\d*)/, "") v.setAttribute("width", tmp[1]) } } })} Greasy Fork