From 9e6a66f1fb66af59061ce87d241c224e8df0fe42 Mon Sep 17 00:00:00 2001 From: yokoffing <11689349+yokoffing@users.noreply.github.com> Date: Sun, 28 Dec 2025 13:55:44 -0500 Subject: [PATCH] add DOM section --- Peskyfox.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/Peskyfox.js b/Peskyfox.js index 754d977..189547c 100644 --- a/Peskyfox.js +++ b/Peskyfox.js @@ -3,7 +3,7 @@ * Peskyfox * * "Aquila non capit muscas" * * priority: remove annoyances * - * version: 146 * + * version: 148 * * url: https://github.com/yokoffing/Betterfox * * credit: Some prefs are reproduced and adapted from the arkenfox project * * credit urL: https://github.com/arkenfox/user.js * @@ -410,6 +410,17 @@ user_pref("browser.download.open_pdf_attachments_inline", true); // [NOTE] "page-width" not needed if using sidebar on load //user_pref("pdfjs.defaultZoomValue", page-width); +/**************************************************************************** + * SECTION: DOM (DOCUMENT OBJECT MODEL) * +****************************************************************************/ +// PREF: prevent scripts from moving and resizing open windows +//user_pref("dom.disable_window_move_resize", true); + +// PREF: disable beforeunload event +// [WHY] The method is commonly abused by scam and spyware sites. +// [1] https://developer.mozilla.org/docs/Web/API/Window/beforeunload_event +//user_pref("dom.disable_beforeunload", true); + /**************************************************************************** * SECTION: TAB BEHAVIOR * ****************************************************************************/ @@ -433,7 +444,7 @@ user_pref("browser.download.open_pdf_attachments_inline", true); // 0 = force all new windows opened by JavaScript into tabs // [NOTE] Most advertising popups also open in new windows with values set // [1] https://kb.mozillazine.org/About:config_entries -//user_pref("browser.link.open_newwindow.restriction", 0); +//user_pref("browser.link.open_newwindow.restriction", 2); // DEFAULT // PREF: override for external links // Set if a different destination for external links is needed @@ -485,9 +496,6 @@ user_pref("findbar.highlightAll", true); // [1] https://gitlab.torproject.org/tpo/applications/tor-browser/-/issues/10089 //user_pref("middlemouse.contentLoadURL", false); -// PREF: Prevent scripts from moving and resizing open windows -//user_pref("dom.disable_window_move_resize", true); - // PREF: insert new tabs after groups like it // true(default) = open new tabs to the right of the parent tab // false = new tabs are opened at the far right of the tab bar