From 9afad4faa905209922b24874fb2b41d169b07f09 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Wed, 13 Jan 2021 02:27:31 +0000 Subject: [PATCH] [Basilisk] [Tabbed browser] Pref detach&tear-off of tabs. See MoonchildProductions/Pale-Moon#1845 --- application/basilisk/app/profile/basilisk.js | 4 ++++ application/basilisk/base/content/tabbrowser.xml | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/application/basilisk/app/profile/basilisk.js b/application/basilisk/app/profile/basilisk.js index ac55e21308..198d9d41c4 100644 --- a/application/basilisk/app/profile/basilisk.js +++ b/application/basilisk/app/profile/basilisk.js @@ -414,6 +414,10 @@ pref("browser.tabs.delayHidingAudioPlayingIconMS", 3000); pref("browser.tabs.dontfocusfordialogs", true); +// Whether dragging a tab off the tab bar to tear it off into its own +// window is enabled. +pref("browser.tabs.allowTabDetach", true); + pref("browser.ctrlTab.previews", false); // By default, do not export HTML at shutdown. diff --git a/application/basilisk/base/content/tabbrowser.xml b/application/basilisk/base/content/tabbrowser.xml index 02bccc477c..17ca983c58 100644 --- a/application/basilisk/base/content/tabbrowser.xml +++ b/application/basilisk/base/content/tabbrowser.xml @@ -6373,6 +6373,11 @@ return; } + // Check if tab detaching is enabled + if (!Services.prefs.getBoolPref("browser.tabs.allowTabDetach")) { + return; + } + // Disable detach within the browser toolbox var eX = event.screenX; var eY = event.screenY;