1 luckycatio 2023-10-11 19:48:48 +08:00 via iPhone 借楼问一下,quanx 能把 vconsole 注入到网页吗 |
![]() | 2 orcusfox 2023-10-11 22:36:59 +08:00 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) }) |
![]() | 4 uTOmOuk3L6sb4MSI 2023-10-25 03:07:46 +08:00 via iPhone @napsterwu 有个问题,就是非 utf-8 编码的网页会乱码 |