Javascript 如何在 Mozilla Firefox Developer Console 中禁用粘贴保护?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/26596858/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-22 23:07:17  来源:igfitidea点击:

How to disable paste protection in Mozilla Firefox Developer Console?

javascriptfirefox

提问by Ms01

I have noticed that in recent versions of Mozilla Firefox there is a super, super annoying bug that disables pastes into the developer console. This has to be the single worst idea ever.

我注意到在最近版本的 Mozilla Firefox 中有一个超级、超级烦人的错误,它禁止粘贴到开发者控制台中。这一定是有史以来最糟糕的想法。

However, I have tried to allow it by typing in the text that it wants me to but I can still not paste in stuff and I think I'm soon going to be so annoyed that I have to switch browser since I use the developer console every day. I really like Mozilla and Firefox and do not want to switch for such a silly thing.

但是,我试图通过输入它希望我输入的文本来允许它,但我仍然无法粘贴内容,我想我很快就会很生气,因为我使用开发者控制台,所以我不得不切换浏览器每天。我真的很喜欢 Mozilla 和 Firefox,不想为了这种愚蠢的事情而切换。

So how to turn off this crappy "feature" for good? I really hope there is a setting but I can't find one. If not I guess I'll have to open a bug ticket for it.

那么如何永久关闭这个蹩脚的“功能”呢?我真的希望有一个设置,但我找不到。如果没有,我想我将不得不为它打开一个错误票。

My firefox version is: 32.0.3

我的火狐版本是:32.0.3

If any Firefox developer sees this, please stop implementing features that makes developers go mad. No non-developer is in that developer console anyway and if they get tricked into pasting something there it is notyour fault.

如果任何 Firefox 开发人员看到这一点,请停止实施让开发人员发疯的功能。无论如何,没有非开发人员在该开发人员控制台中,如果他们被欺骗在那里粘贴某些内容,这不是您的错。

采纳答案by Enyby

Since you are automating things, you can get rid of this feature by setting the setting devtools.selfxss.countto a high number like 100.

由于您正在自动化操作,您可以通过将设置设置devtools.selfxss.count为 100 之类的高数字来摆脱此功能。

https://bugzilla.mozilla.org/show_bug.cgi?id=994134#c82

https://bugzilla.mozilla.org/show_bug.cgi?id=994134#c82

This settings can be changed on page about:config.

可以在页面 上更改此设置about:config

回答by sreekanth kuriyala

  1. Open console and type "allow pasting" and hit enter.
  2. Now try to paste something. It will paste.
  1. 打开控制台并输入“允许粘贴”并按回车键。
  2. 现在尝试粘贴一些东西。它会粘贴。

The Same solution is provided by Mozilla when we try to paste.

当我们尝试粘贴时,Mozilla 提供了相同的解决方案。

Hope this will help you.

希望这会帮助你。

回答by Andrew Royer

Actually as of may 21 2020 "allow paste" "allow pasting" and devtools.selfxss.count do not work. I already migrated from chrome because of backdoors literally built into the browser by developers. I'd really rather not have to do that again already.

实际上,截至 2020 年 5 月 21 日,“允许粘贴”“​​允许粘贴”和 devtools.selfxss.count 不起作用。由于开发人员在浏览器中内置了后门,我已经从 chrome 迁移了。我真的宁愿不必再这样做了。

The solution I found was to use about:config and enable “dom.event.clipboardevents.enabled” Worked for me, this should work.

我找到的解决方案是使用 about:config 并启用“dom.event.clipboardevents.enabled”对我有用,这应该可以工作。