在我的网站禁用萤火虫的方法是什么? [英] Which way to disable firebug in my website?

查看:164
本文介绍了在我的网站禁用萤火虫的方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想禁用每个我的网页上的萤火虫。有时,我们在我的ui小部件中嵌入了重要的
键或id。我们从服务器端的一些方法将采取这些键进行处理。所以,有人可以通过萤火虫编辑。这可能会导致我们的数据库错误的数据更新或在网页中显示错误的数据。对于安全选项,我想禁用使用萤火虫或浏览器的其他开发工具。作为 GoogleChrome 的主页,当我打开其中的萤火虫时,我想显示以下错误讯息。



我该怎么办?
例如:我想用JavaScript来验证表单数据,或者使用 JQuery表单验证
没关系。但是当我用萤火虫和删除错误信息的元素将成为验证这种形式。如何防止!任何建议,将不胜感激。
真的,我的意思不仅是萤火虫,还有其他开发工具,插件,插件。
我的问题的重点是如何禁用它们。
Chrome Browser主页上的FireBug过程和验证表单实例是我想要做的示例。

这个问题的实际答案,因为有些网页无法运行Chrome扩展程序。硬编码的原因:


  1. Chrome扩展程序无法触摸Chrome网上应用店页面。在Chromium源代码中,这将 ChromeExtensionsClient :: IsScriptableURL 。引用:
    $ b $

      //这个图库是特殊的脚本,作为一个受限制的脚本来防止
    //访问我们公开给图库的特殊JS绑定(并避免
    //像扩展删除报告滥用链接)。

    可以通过命令行标志覆盖这个限制: - allow-scripting-gallery 问题本身的异常:内容脚本不允许使用新的标签页,因为它位于 chrome:// URI方案中。在源代码中,您可以看到 ChromeExtensionsClient :: GetPermittedChromeSchemeHosts

      //定期扩展只允许访问chrome:// favicon 

    扩展可以覆盖新的标签页,而不是注入他们的脚本。



    它可以是用Chrome标记覆盖


    把这个作为一个社区维基留下,所以人们可以自由地添加到这个答案中。



    正如在其他答案中指出的那样,禁止在常规页面上扩展是军备竞赛, 。


    I want to disable firebug using on each my webpages. Sometimes , we embedded important keys or id in my ui widgets. Some of our methods from server side will takes these keys for processing. So , someone can edit by firebug. That may cause wrong data updating of our database or wrong data showing in webpages. For security options , I want to disable using firebug or other developer tools of browsers. As GoogleChrome 's home page , when I open firebug in it , I want to show error message as follow..

    How can I do as like it ? Eg: I want to validate my form datas with JavaScript or such as using with JQuery Form Validation That's fine. But when I use with firebug and delete elements of error messages will become validate this form.How to prevent it !Any suggestions would be appreciated. Really I means not only firebug but also others developer tools, addons , plugins. My question main point is how to disabling them. FireBug in Chrome Browser home page process and validation form instances are examples for I want to do.

    解决方案

    Let's have an actual answer to this question, as in, how is it that some pages cannot run Chrome extensions. Hardcoded reasons:

    1. There is a specific exception that Chrome Extensions cannot touch Chrome Web Store pages. In the Chromium source code, that would ChromeExtensionsClient::IsScriptableURL. Quoting:

      // The gallery is special-cased as a restricted URL for scripting to prevent
      // access to special JS bindings we expose to the gallery (and avoid things
      // like extensions removing the "report abuse" link).
      

      One can override this restriction by a command line flag: --allow-scripting-gallery

    2. The exception in the question itself: New Tab page is not allowed for content scripts, since it's on a chrome:// URI scheme. In the source code, you can see ChromeExtensionsClient::GetPermittedChromeSchemeHosts:

      // Regular extensions are only allowed access to chrome://favicon
      

      Extensions can override a new tab page, but not inject their scripts into one.

      It can be overridden with a Chrome flag.

    I'm leaving this as a community wiki, so people can freely add to this answer.

    As noted in other answers, disallowing extensions on regular pages is an arms race one cannot win.

    这篇关于在我的网站禁用萤火虫的方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆