OSDN Git Service

Regular updates
[twpd/master.git] / weinre.md
1 ---
2 title: Weinre
3 category: JavaScript libraries
4 layout: 2017/sheet
5 tags: [Archived]
6 intro: |
7   [weinre](https://www.npmjs.com/package/weinre) is a remote Web inspector. Note that it has been deprecated since 2016.
8 ---
9
10 ### Usage
11
12 #### Install:
13
14 ```
15 $ npm install -g weinre
16 ```
17
18 #### Start the server:
19
20 ```
21 $ weinre --boundHost 0.0.0.0
22 $ open http://localhost:8080
23 ```
24
25 ### HTML to inject
26
27 <!--prettier-ignore -->
28 ```html
29 <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>
30 ```
31
32 ### References
33
34 - [Weinre](http://people.apache.org/~pmuellr/weinre/)
35