搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Allowed Popups: enter a list of allowed sites?

  • 1 回覆
  • 0 有這個問題
  • 最近回覆由 cor-el

more options

I save a list of >20 sites on which I allow popups. What is the most efficient way to enter those sites?

==> I would like to avoid entering each one individually.

TYVM.

I save a list of >20 sites on which I allow popups. What is the most efficient way to enter those sites? ==> I would like to avoid entering each one individually. TYVM.

所有回覆 (1)

more options

You can possibly do this via the Browser Console (not the Web Console).

You can enable the command-line in the Console via the Settings page of the Web Developer Tools.


You can add the origins to the ORIGINS array.

var ORIGINS = ["https://example.com"];
var i, origin;
for (i=0; origin=ORIGINS[i]; i++){
 Services.perms.addFromPrincipal(
  Services.scriptSecurityManager.createContentPrincipalFromOrigin(origin),
  "popup", SitePermissions.ALLOW
 );
}

有幫助嗎?

問個問題

如果您還沒有帳號,您必須先登入帳號 來回覆文章。還沒有帳號的話,只能發問新問題