如何恢复已禁用的console.log?

How to Restore a Disabled console.log?
通过将其拉出iframe,在已删除的页面(如twitter)上恢复console.log

function setConsole() {
  var iframe = document.createElement('iframe');
  iframe.style.display = 'none';
  document.body.appendChild(iframe);
  console = iframe.contentWindow.console;
  window.console = console;
}

相关文章:

  • 2021-12-22
  • 2021-07-10
  • 2021-08-03
  • 2021-10-16
  • 2021-09-17
猜你喜欢
  • 2022-12-23
  • 2021-09-02
  • 2021-09-08
  • 2021-08-11
  • 2021-12-12
  • 2022-12-23
  • 2021-09-03
相关资源
相似解决方案