Skip to content

Commit

Permalink
feat(firefox): add a way to handle suggestion in urlbar
Browse files Browse the repository at this point in the history
  • Loading branch information
kud committed Sep 28, 2020
1 parent c85b231 commit 874449a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
19 changes: 19 additions & 0 deletions bin/_/firefox-suggest-disable
@@ -0,0 +1,19 @@
#! /usr/bin/env zsh

source $MY/core/helper

echo_title_update "firefox settings"

DEFAULT_FOLDER=$(ls "$HOME/Library/Application Support/Firefox/Profiles" | grep .default-nightly)
PREFS_JS="$HOME/Library/Application Support/Firefox/Profiles/$DEFAULT_FOLDER/prefs.js"

echo 'user_pref("browser.urlbar.suggest.bookmark", false);' >>$PREFS_JS
echo 'user_pref("browser.urlbar.suggest.history", false);' >>$PREFS_JS
echo 'user_pref("browser.urlbar.suggest.openpage", false);' >>$PREFS_JS
echo 'user_pref("browser.urlbar.suggest.topsites", false);' >>$PREFS_JS

quit "firefox"

sleep 5

open-firefox-nightly
21 changes: 21 additions & 0 deletions bin/_/firefox-suggest-enable
@@ -0,0 +1,21 @@
#! /usr/bin/env zsh

source $MY/core/helper

echo_title_update "firefox settings"

DEFAULT_FOLDER=$(ls "$HOME/Library/Application Support/Firefox/Profiles" | grep .default-nightly)
PREFS_JS="$HOME/Library/Application Support/Firefox/Profiles/$DEFAULT_FOLDER/prefs.js"

quit "firefox"

sleep 5

echo 'user_pref("browser.urlbar.suggest.bookmark", true);' >>$PREFS_JS
echo 'user_pref("browser.urlbar.suggest.history", true);' >>$PREFS_JS
echo 'user_pref("browser.urlbar.suggest.openpage", true);' >>$PREFS_JS
echo 'user_pref("browser.urlbar.suggest.topsites", true);' >>$PREFS_JS

sleep 2

open-firefox-nightly

0 comments on commit 874449a

Please sign in to comment.