Cheat Sheet速查表
跳转到主要内容

Weinre 速查表

本文根据 Devhints / Weinre 翻译。代码示例及版本范围沿用原文。此资料为归档或旧版本参考。

weinre 是一个远程 Web 检查器。请注意,该功能自 2016 年起已被弃用。

原文归档说明:Weinre 自 2016 年起已被弃用。

用法

安装:

$ npm install -g weinre

启动服务器:

$ weinre --boundHost 0.0.0.0
$ open http://localhost:8080

注入 HTML

<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.async=1;js.src='http://'+location.hostname+':8080/target/target-script-min.js#anonymous';fjs.parentNode.insertBefore(js,fjs);}}(document,'script','weinre');</script>

参考资料