79d182c
1
2
3
4
5
6
7
8
window.addEventListener("error", e => { const tag = e.target if (tag.tagName === 'SCRIPT' && !(e instanceof ErrorEvent)) { console.log("JS 加载错误") const url=new URL(tag.src) document.write(`<script src="${url.toString()}">\<\/script>`); } }, true);