Windows 10 reached EOS (end of support) on October 14, 2025. For more information, see this article.

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Disabling javascript alerts?

  • 8 个回答
  • 2 人有此问题
  • 121 次查看
  • 最后回复者为 LostGod

更多选项

I am using an extension called Black YouTube Theme (https://addons.mozilla.org/en-US/firefox/addon/black-youtube-theme/). Currently Whenever I start Firefox using restore session from last time. For any YouTube links I have open it pops open a little JavaScript Application box, one per link, which returns "Error: document.domain is null". That is the only problem I have, so I was wondering does anyone know how to disable JavaScript error messages using about:config?

I am using an extension called Black YouTube Theme (https://addons.mozilla.org/en-US/firefox/addon/black-youtube-theme/). Currently Whenever I start Firefox using restore session from last time. For any YouTube links I have open it pops open a little JavaScript Application box, one per link, which returns "Error: document.domain is null". That is the only problem I have, so I was wondering does anyone know how to disable JavaScript error messages using about:config?

被采纳的解决方案

capability.policy prefs aren't supported in current Firefox releases, so you can undo these steps.

If it only happens when you reopen pages automatically on the next start then this is likely caused by Firefox loading pages from the cache.

定位到答案原位置 👍 1

所有回复 (8)

更多选项

Try this thread on mozillazine:

更多选项

Maybe disable the disk cache or clearing the cache on exit (Clear history when Firefox closes) will prevent this alert.

See also:

更多选项

So from my understanding I just put:

"capability.policy.default.Window.alert", "noAccess" "capability.policy.default.Window.confirm", "noAccess" "capability.policy.default.Window.prompt", "noAccess"

As new variables in about:config?

更多选项

forgottengods said

So from my understanding I just put: "capability.policy.default.Window.alert", "noAccess" "capability.policy.default.Window.confirm", "noAccess" "capability.policy.default.Window.prompt", "noAccess" As new variables in about:config?

These didn't work. I still receive 1 JavaScript Application "Error: document.domain is null" for every YouTube page open on restart.

更多选项

选择的解决方案

capability.policy prefs aren't supported in current Firefox releases, so you can undo these steps.

If it only happens when you reopen pages automatically on the next start then this is likely caused by Firefox loading pages from the cache.

更多选项

I have disk cache set to 0 and the Boolean variable set to false. So I do not believe it is a cache issue.

更多选项

When was capability.policy removed? What next is going to be gutted out? I am really happy I use SeaMonkey.

更多选项

It most likely has been replaced with a different name. I do not believe that they would remove something like that. Options/customization, is the whole reason I use Firefox. Without I might as well use Chrome.