How does Facebook disable the browser's integrated Developer Tools?

后端 未结 12 1181
予麋鹿
予麋鹿 2020-11-22 06:12

So apparently because of the recent scams, the developer tools is exploited by people to post spam and even used to \"hack\" accounts. Facebook has blocked the developer too

12条回答
  •  忘掉有多难
    2020-11-22 06:50

    Chrome changed a lot since the times facebook could disable console...

    As per March 2017 this doesn't work anymore.

    Best you can do is disable some of the console functions, example:

    if(!window.console) window.console = {};
    var methods = ["log", "debug", "warn", "info", "dir", "dirxml", "trace", "profile"];
    for(var i=0;i

提交回复
热议问题