1
luckycatio 233 天前 via iPhone
借楼问一下,quanx 能把 vconsole 注入到网页吗
|
2
napsterwu 233 天前 via iPhone
@luckycatio 把 html 页的请求拦截掉,然后替换
$task.fetch($request).then($response => { let body = $response.body body = body.replace('<head>', '<head><script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script><script>var vConsole = new window.VConsole();</script>') delete $response.headers['Content-Length'] $done(body) }) |