开发者

Modify a page to remove invalid Javascript prior to it being parsed

To provide some background, I'm working with a CMS which I don't have much control over. I wanted to add google analytics so I injected some Javascript into the page as a normal html link. Which I thought was really clever of me until I realised that broke the whole CMS in the process.

In order to remove the Javscript I need to be able to use the CMS. I don't have DB access.

What I want to do is using either a proxy or some kind of clever browser addon, essentially do a simple string replace on the page to remove the bad code. And, just to make things more interesting, the CMS requires ActiveX which limits me to using I开发者_StackOverflow中文版E.

Any suggestions or advice on either how to set up a local proxy to do this or otherwise use a browser addon to make the page work would be greatly appreciated.

Edit: Just to be clear, I am quite confident that the injected code is causing a Javascript error.


Firebug.

Load up the page, then right click on the link you modified and choose "inspect element", then you can edit the html, or javascript right there.

Oh, and don't use IE, use Firefox. Chrome actually some some built in debugging tools you can use as well.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜