mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
Glance contextmenu search pref (#8963)
* Add zen.glance.enable-contextmenu-search preference and logic * Add zen.glance.enable-contextmenu-search preference and logic
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
pref('zen.glance.enabled', true);
|
||||
pref('zen.glance.enable-contextmenu-search', true);
|
||||
pref('zen.glance.hold-duration', 300); // in ms
|
||||
pref('zen.glance.open-essential-external-links', true);
|
||||
pref('zen.glance.activation-method', 'alt'); // ctrl, alt, shift, none, hold
|
||||
|
@@ -748,8 +748,11 @@
|
||||
}
|
||||
|
||||
onSearchSelectCommand(where) {
|
||||
// Check if glance is enabled in user preferences
|
||||
if (!Services.prefs.getBoolPref('zen.glance.enabled', false)) {
|
||||
// Check if Glance is globally enabled and specifically enabled for contextmenu/search
|
||||
if (
|
||||
!Services.prefs.getBoolPref('zen.glance.enabled', false) ||
|
||||
!Services.prefs.getBoolPref('zen.glance.enable-contextmenu-search', true)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
if (where !== 'tab') {
|
||||
|
Reference in New Issue
Block a user