admin管理员组文章数量:1401621
For educational purpose, I want to remotely debug an application running on my mobile device that I don't have access to the source code, as long as I understand that is possible with direct injection:
.html
.html?javascript:(function(s){s.src='.js';document.body.appendChild(s)})(document.createElement('script'))
I tried to follow the instructions, I created the bookmaker on my device and everything but I have no clue how to make it work, does any one have any idea how it works?
This page should redirect right away to the correct url, once it does, bookmarket it on your mobile phone, then remove the .html? (including the question mark) part to get the bookmarklet to work.
Alternatively, to inject JS Console, bookmarket this: JS Console and sync to your phone.
For instance, how can I debug remotely this jQueryUI with ???: .html
Thanks!
PS, jsconsole screencast
For educational purpose, I want to remotely debug an application running on my mobile device that I don't have access to the source code, as long as I understand that is possible with http://jsconsole. direct injection:
http://jsconsole./inject.html
http://jsconsole./inject.html?javascript:(function(s){s.src='http://jsconsole./inject.js';document.body.appendChild(s)})(document.createElement('script'))
I tried to follow the instructions, I created the bookmaker on my device and everything but I have no clue how to make it work, does any one have any idea how it works?
This page should redirect right away to the correct url, once it does, bookmarket it on your mobile phone, then remove the http://jsconsole./inject.html? (including the question mark) part to get the bookmarklet to work.
Alternatively, to inject JS Console, bookmarket this: JS Console and sync to your phone.
For instance, how can I debug remotely this jQueryUI with http://jsconsole.???: http://jqueryui./demos/resizable/default.html
Thanks!
PS, jsconsole screencast http://www.youtube./watch?v=Y219Ziuipvc
Share Improve this question edited Apr 20, 2012 at 14:50 lito asked Apr 20, 2012 at 14:21 litolito 3,12511 gold badges45 silver badges71 bronze badges 5- Why not use firebug or firebug lite? – Larry Battle Commented Apr 20, 2012 at 14:31
- Did you click on the bookmark that you made? – scottheckel Commented Apr 20, 2012 at 14:35
- 1 @LarryBattle: because there is no way to use firebug on a WebKit mobile browser. – lito Commented Apr 20, 2012 at 14:41
- @Hexxagonal: yes I did, and I got the jsconsole but then how can I remotely debug? – lito Commented Apr 20, 2012 at 14:41
- Note that, at the moment, the bookmarklet for injection is broken due to a file having gone missing in refactoring: github./remy/jsconsole/issues/75 – Stuart P. Bentley Commented Aug 22, 2016 at 15:26
2 Answers
Reset to default 5Once you've got the jsconsole up and running type the mand:
:listen
to begin remote debugging.
Here's what I did to make this work for me:
- Go to the console at JSConsole.Com
- Run the mand
:listen
- this generates a unique key for you with a JS url. - Copy the url it gives you for the JS file, It looks something like: http://jsconsole./remote.js?C180AA15-F9E3-406F-A8F5-F27267DE69C6
- Open a new browser window and go to the URL you want to debug
- Paste the following into the browser replacing the URL for the one you generated above:
javascript:(function(s){s.src='http://jsconsole./remote.js?C180AA15-F9E3-406F-A8F5-F27267DE69C6';document.body.appendChild(s)})(document.createElement('script'));
- Go back to the console window and it'll tell you it's connected:
Connection established with http://jqueryui./demos/resizable/default.html Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19
Right click on the bookmark.
Click edit in context menu.
Delete http://jsconsole./inject.html?
from it.
Now go to the page you want to analyse and left click on the bookmark. You'll get redirected to http://jsconsole./ and now you can do anything with the page you want.. e.g. you can check the title by typing document.title
and pressing enter.
本文标签: javascripthow to inject JS Console in to any page jsconsolecomStack Overflow
版权声明:本文标题:javascript - how to inject JS Console in to any page? jsconsole.com - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744319858a2600441.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论