ポップアップ抑制

往々にして、ポップアップウィンドウが勝手に開いたりするのは非常に迷惑なものです。Mozilla では、少し user.js に以下の記述をしておくことで簡単にこれらを防ぐことができます。

user_pref("dom.disable_open_during_load", "noAccess");

onload のタイミングでウィンドウが開かれるのを抑制します。

user_pref("browser.target_new_blocked", "noAccess");

target="hoge" などによる、新しいウィンドウが開かれるのを抑制し、同じウィンドウで開くようにします。

user_pref("capability.policy.default.Window.open", "noAccess");

Window.open でウィンドウが開かれるのを抑制します。

user_pref("imageblocker.enable", true);

別サーバからの画像の転送を抑制します。

ウィンドウサイズの変更抑制

これらにより、HTML 文書が読み込まれたり、クリックした際に妙なポップアップウィンドウが出たり新しいフレームが開かれたりするのを抑制できます。

さらに、以下のようにすると勝手にウィンドウサイズを変更されないようにする設定もできます。完全ではありませんが、大体のものはだいじょうぶでしょう。

  • user_pref("capability.policy.default.Window.innerHeight.set", "noAccess");
  • user_pref("capability.policy.default.Window.innerWidth.set", "noAccess");
  • user_pref("capability.policy.default.Window.outerHeight.set", "noAccess");
  • user_pref("capability.policy.default.Window.outerWidth.set", "noAccess");
  • user_pref("capability.policy.default.Window.sizeToContent", "noAccess");
  • user_pref("capability.policy.default.Window.resizeBy", "noAccess");
  • user_pref("capability.policy.default.Window.resizeTo", "noAccess");
  • user_pref("capability.policy.default.Window.moveBy", "noAccess");
  • user_pref("capability.policy.default.Window.moveTo", "noAccess");
  • user_pref("capability.policy.default.Window.screenX.set", "noAccess");
  • user_pref("capability.policy.default.Window.screenY.set", "noAccess");

ステータスバー書き換え抑制

以下の項目を追加すると、ステータスバーへの書き込みを抑制できます。

  • user_pref("capability.policy.default.Window.status", "noAccess");