diff --git a/README.md b/README.md
index 88956b0..279f743 100644
--- a/README.md
+++ b/README.md
@@ -209,15 +209,16 @@ The script will only process the filtered set of Firefox paths.
### Available options
-| Option flag | Default | Description |
-|---------------------------------------------|:-------:|-------------|
-| `--option autoCompleteCopiesToClipboard` | Off | This option requires `autoSelectCopiesToClipboard` to be set and is ignored without it. This option additionally enables copying selection in the URL bar triggered by typing a URL which is known by the browser (e.g. typing `gi` may autocomplete `github.com`, and the part `thub.com` is selected; the option enables automatically copying this selection to the clipboard). |
-| `--option autoSelectCopiesToClipboard` | Off |
Certain actions trigger an automatic selection of text in the URL bar or the search bar which aren’t considered user-initiated and as such are not added to the selection clipboard (e.g. selected text which can be inserted with middle-click on Linux) — see the wiki entry.
This option enables clipboard selection for most cases: Ctrl+L or F6 for URL bar selection; Ctrl+K for search bar selection; Esc to restore the original URL; Tab to focus either URL bar or search bar; or single-click or double-click selecting the entire text — if enabled.
However, additional options must be passed if selection triggered by a tab switch should also be copied (tabSwitchCopiesToClipboard
), and if selection triggered by URL auto-complete should be copied (autoCompleteCopiesToClipboard
).
|
-| `--option clearSearchBarOnSubmit` | Off | Submitting a search from the separate search bar clears it. There’s discussion about this feature on Super User and on Bugzilla. |
-| `--option doubleClickSelectsAll` | Off | Double-clicking the URL bar or the search bar selects the entire input field. |
-| `--option preventClickSelectsAll` | On | Clicking the URL bar or the search bar no longer selects the entire input field. |
-| `--option secondsSeekedByKeyboard=`_number_ | | Pressing ← or → in the built-in video player (including Picture-in-Picture mode) seeks by _number_ seconds. [Bugzilla Bug 1668692](https://bugzilla.mozilla.org/show_bug.cgi?id=1668692) already changed this from 15 seconds to 5 seconds, but still didn’t offer an easily accessible option to change this duration. |
-| `--option tabSwitchCopiesToClipboard` | Off | This option requires `autoSelectCopiesToClipboard` to be set and is ignored without it. This option additionally enables copying selection in URL bar triggered by switching to a tab with a focused URL bar (with either clicking or with Ctrl+(Shift)+Tab, Ctrl+Page Up, Ctrl+Page Down, Alt+1..9, and possibly other ways). |
+| Option flag | Default | Description |
+|----------------------------------------------------|:-------:|-------------|
+| `--option autoCompleteCopiesToClipboard` | Off | This option requires `autoSelectCopiesToClipboard` to be set and is ignored without it. This option additionally enables copying selection in the URL bar triggered by typing a URL which is known by the browser (e.g. typing `gi` may autocomplete `github.com`, and the part `thub.com` is selected; the option enables automatically copying this selection to the clipboard). |
+| `--option autoSelectCopiesToClipboard` | Off | Certain actions trigger an automatic selection of text in the URL bar or the search bar which aren’t considered user-initiated and as such are not added to the selection clipboard (e.g. selected text which can be inserted with middle-click on Linux) — see the wiki entry.
This option enables clipboard selection for most cases: Ctrl+L or F6 for URL bar selection; Ctrl+K for search bar selection; Esc to restore the original URL; Tab to focus either URL bar or search bar; or single-click or double-click selecting the entire text — if enabled.
However, additional options must be passed if selection triggered by a tab switch should also be copied (tabSwitchCopiesToClipboard
), and if selection triggered by URL auto-complete should be copied (autoCompleteCopiesToClipboard
).
|
+| `--option clearSearchBarOnSubmit` | Off | Submitting a search from the separate search bar clears it. There’s discussion about this feature on Super User and on Bugzilla. |
+| `--option doubleClickSelectsAll` | Off | Double-clicking the URL bar or the search bar selects the entire input field. |
+| `--option preventClickSelectsAll` | On | Clicking the URL bar or the search bar no longer selects the entire input field. |
+| `--option secondsSeekedByKeyboard=`_number_ | | Pressing ← or → in the built-in video player (including Picture-in-Picture mode) seeks by _number_ seconds. [Bugzilla Bug 1668692](https://bugzilla.mozilla.org/show_bug.cgi?id=1668692) already changed this from 15 seconds to 5 seconds, but still didn’t offer an easily accessible option to change this duration. |
+| `--option tabSwitchCopiesToClipboard` | Off | This option requires `autoSelectCopiesToClipboard` to be set and is ignored without it. This option additionally enables copying selection in URL bar triggered by switching to a tab with a focused URL bar (with either clicking or with Ctrl+(Shift)+Tab, Ctrl+Page Up, Ctrl+Page Down, Alt+1..9, and possibly other ways). |
+| `--option preventChangingSearchEnginesByScrolling` | Off | Scrolling with Control held or zooming on the search bar no longer changes the current search engine. |
### Examples
diff --git a/fixfx.sh b/fixfx.sh
index e539899..1e9b568 100644
--- a/fixfx.sh
+++ b/fixfx.sh
@@ -35,6 +35,7 @@ declare -A settings=(
[options|preventClickSelectsAll]='on'
[options|secondsSeekedByKeyboard]=''
[options|tabSwitchCopiesToClipboard]=''
+ [options|preventChangingSearchEnginesByScrolling]=''
[quiet]=''
# End presets.
)
@@ -143,7 +144,7 @@ fix_option_default_value(){
local -r fix_key="${1}"
case "${fix_key}" in
- 'autoCompleteCopiesToClipboard' | 'autoSelectCopiesToClipboard' | 'clearSearchBarOnSubmit' | 'doubleClickSelectsAll' | 'preventClickSelectsAll' | 'tabSwitchCopiesToClipboard')
+ 'autoCompleteCopiesToClipboard' | 'autoSelectCopiesToClipboard' | 'clearSearchBarOnSubmit' | 'doubleClickSelectsAll' | 'preventClickSelectsAll' | 'tabSwitchCopiesToClipboard' | 'preventChaningSearchEnginesByScrolling')
echo 'on'
;;
*)
@@ -223,6 +224,11 @@ FIX_OPTION_KEYs:
Requires autoSelectCopiesToClipboard. Also copies
selection to clipboard when switching tabs;
${settings[options|autoCompleteCopiesToClipboard]:-off} by default.
+
+ preventChangingSearchEnginesByScrolling
+ Scrolling with Control held or zooming on the
+ search bar no longer changes search engines;
+ ${settings[options|preventChangingSearchEnginesByScrolling]:-off} by default.
Examples:
# Fix all Firefox installations that are automatically found, then
@@ -735,6 +741,10 @@ edit_and_lock_based_on_options(){
edit_file 'secondsSeekedByKeyboard' 'omni' 'chrome/toolkit/content/global/elements/videocontrols.js' "s/(newval = oldval [+-] |static SEEK_TIME_SECS = )[0-9]+;/\1${settings[options|secondsSeekedByKeyboard]-};/"
edit_file 'secondsSeekedByKeyboard' 'omni' 'actors/PictureInPictureChild.jsm' "s/(newval = oldval [+-] |const SEEK_TIME_SECS = )[0-9]+;/\1${settings[options|secondsSeekedByKeyboard]-};/"
fi
+
+ if [[ "${settings[options|preventChangingSearchEnginesByScrolling]-}" ]]; then
+ edit_file 'preventChangingSearchEnginesByScrolling' 'browser_omni' 'chrome/browser/content/browser/search/searchbar.js' '/this\.addEventListener\(/,/"DOMMouseScroll"/ s/this\.addEventListener//'
+ fi
}
prepare_backup_instructions(){