简体   繁体   English

如何使用firebug从特定网站获取Javascript函数的源代码?

[英]How to get Javascript function's source code from specific site using firebug?

With firebug I found that clicking on the link calls javascript function 用firebug我发现点击链接调用javascript函数

<a href="#" onclick="viewHide(this);return false;">

But I couldn't find it's implementation in page source. 但我无法在页面源中找到它的实现。
Is it possible to get it? 有可能得到它吗?

The site is in hebrew, but I don't think it's problem : link text to trigger for this function click on any comments title that follow the article. 该网站是希伯来语,但我不认为这是问题: 链接文本触发此功能点击文章后面的任何评论标题。

removed dead ImageShack link 删除了死的ImageShack链接

Just write in console: 只需在控制台中写:

viewHide.toString()

You will get a source code of function as a text. 您将获得函数的源代码作为文本。

You can also put ViewHide under the Name column of the watch panel on the Script tab. 您还可以将ViewHide放在“脚本”选项卡上“监视”面板的“名称”列下。 When you press enter or click out after putting in the name, it should evaluate it and put the code in the Value column. 当您在输入名称后按Enter或单击时,它应评估它并将代码放在“值”列中。

Just write in console: 只需在控制台中写:

console.log(viewHide)

Then double-click the output will jump to the source file of the function definition. 然后双击输出将跳转到函数定义的源文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM