1
0
mirror of https://github.com/yokoffing/Betterfox.git synced 2026-06-28 07:31:17 +05:30

Compare commits

..

3 Commits

Author SHA1 Message Date
minh2134 c97bc06396 install.py: Waterfox compatibility and default to firefox user.js always (#485)
* install.py: Integrate waterfox and default to firefox user.js always

This commit:
- Removes the old --zen switch
- Adds a new --browser/-b switch to specify the browser. Available
  options: firefox, waterfox, zen
- Now defaults to the firefox user.js even if there's new user.js added

* install.py: Remove the redundant --zen flag
2026-05-30 22:03:12 -04:00
Vadim Zyamalov 392c62a03c New profile system aloows for non-ascii characters (#470) 2026-05-03 12:22:57 -04:00
yokoffing 0bc76714a9 Delete .github/FUNDING.yml 2026-05-01 17:35:42 -04:00
4 changed files with 19 additions and 30 deletions
-13
View File
@@ -1,13 +0,0 @@
# These are supported funding model platforms
github: yokoffing
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: yokoffing
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: yokoffing
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
+5
View File
@@ -92,6 +92,11 @@ Betterfox is an opinionated preference list inspired by the [law of diminishing
If you like the project, leave a :star: (top right) and become a [stargazer](https://github.com/yokoffing/Betterfox/stargazers)!
[![Stargazers repo roster for @yokoffing/Betterfox](https://reporoster.com/stars/dark/yokoffing/Betterfox)](https://github.com/yokoffing/Betterfox/stargazers)
<a href='https://ko-fi.com/Q5Q5G8EPH' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi2.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
<noscript><a href="https://liberapay.com/yokoffing/donate"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></noscript>
## Credit
* Betterfox mirrors the ongoing work provided by [arkenfox](https://github.com/arkenfox/user.js). Additionally, this repository includes content reproduced or adapted from other sources. Credit for overlapping material goes to the original authors.
* Appreciation goes to the [Firefox](https://www.mozilla.org/en-US/firefox/new/) team and developers working on [Bugzilla](https://bugzilla.mozilla.org/home), fighting for the open web.
+5 -10
View File
@@ -3,7 +3,7 @@
* Securefox *
* "Natura non contristatur" *
* priority: provide sensible security and privacy *
* version: 152 *
* version: 150 *
* url: https://github.com/yokoffing/Betterfox *
* credit: Most prefs are reproduced and adapted from the arkenfox project *
* credit urL: https://github.com/arkenfox/user.js *
@@ -46,20 +46,15 @@ user_pref("browser.contentblocking.category", "strict"); // [HIDDEN PREF]
// Opener and redirect heuristics are granted for 30 days, see [3]
// [1] https://blog.mozilla.org/security/2021/07/13/smartblock-v2/
// [2] https://hg.mozilla.org/mozilla-central/rev/e5483fd469ab#l4.12
// [3] https://developer.mozilla.org/docs/Web/Privacy/Guides/State_Partitioning#storage_access_heuristics
//user_pref("privacy.antitracking.enableWebcompat", false);
//user_pref("privacy.restrict3rdpartystorage.heuristic.navigation", false);
//user_pref("privacy.restrict3rdpartystorage.heuristic.opened_window_after_interaction", false);
//user_pref("privacy.restrict3rdpartystorage.heuristic.recently_visited", false); // DEFAULT
//user_pref("privacy.restrict3rdpartystorage.heuristic.redirect", false); // DEFAULT
//user_pref("privacy.restrict3rdpartystorage.heuristic.window_open", false); // DEFAULT
// [3] https://developer.mozilla.org/docs/Web/Privacy/State_Partitioning#storage_access_heuristics
// user_pref("privacy.antitracking.enableWebcompat", false);
// PREF: set ETP Strict/Custom exception lists (FF141+)
// [SETTING] Options>Privacy & Security>Enhanced Tracking Protection>Strict/Custom>Fix major [baseline] | minor [convenience]
// [1] https://support.mozilla.org/en-US/kb/manage-enhanced-tracking-protection-exceptions
// [2] https://etp-exceptions.mozilla.org/
//user_pref("privacy.trackingprotection.allow_list.baseline.enabled", true); // [DEFAULT: true]
//user_pref("privacy.trackingprotection.allow_list.convenience.enabled", true); // [DEFAULT: true]
// user_pref("privacy.trackingprotection.allow_list.baseline.enabled", true); // [DEFAULT: true]
// user_pref("privacy.trackingprotection.allow_list.convenience.enabled", true); // [DEFAULT: true]
// PREF: query stripping
// Currently uses a small list [1]
+9 -7
View File
@@ -99,7 +99,7 @@ def _get_default_profile_folder(firefox_root):
print(f"Reading {config_path}...")
config_parser = ConfigParser(strict=False)
config_parser.read(config_path)
config_parser.read(config_path, encoding = "utf8")
path = None
for section in config_parser.sections():
@@ -174,12 +174,17 @@ def download_betterfox(url):
def extract_betterfox(data, profile_folder):
zipfile = ZipFile(data)
userjs_zipinfo = None
depth = 1 # default to firefox user.js living at root dir
if args.browser != "firefox":
depth = 2 # ignore the outside
for file in zipfile.filelist:
if "/zen/" in file.filename and not args.zen:
path = file.filename.split("/")
if len(path)-1 != depth or (args.browser not in path and depth != 1) :
continue
if file.filename.endswith("user.js"):
userjs_zipinfo = file
userjs_zipinfo.filename = Path(userjs_zipinfo.filename).name
break
if not userjs_zipinfo:
raise BaseException("Could not find user.js!")
@@ -212,18 +217,15 @@ if __name__ == "__main__":
default_profile_folder = _get_default_profile_folder(firefox_root)
argparser = ArgumentParser(
)
argparser = ArgumentParser()
argparser.add_argument("--overrides", "-o", default=default_profile_folder.joinpath("user-overrides.js"), help="if the provided file exists, add overrides to user.js. Defaults to " + str(default_profile_folder.joinpath("user-overrides.js"))),
argparser.add_argument("--zen", "-z", action="store_true", default=False, help="Install user.js for the Zen browser instead. Defaults to False"),
advanced = argparser.add_argument_group("Advanced")
advanced.add_argument("--betterfox-version", "-bv", default=None, help=f"Which version of Betterfox to install. Defaults to the latest compatible release for your installed Firefox version")
advanced.add_argument("--profile-dir", "-p", "-pd", default=default_profile_folder, help=f"Which profile dir to install user.js in. Defaults to {default_profile_folder}")
advanced.add_argument("--repository-owner", "-ro", default="yokoffing", help="owner of the Betterfox repository. Defaults to yokoffing")
advanced.add_argument("--repository-name", "-rn", default="Betterfox", help="name of the Betterfox repository. Defaults to Betterfox")
advanced.add_argument("--browser", "-b", default="firefox", help="Which browser should Betterfox install to. Defaults to firefox. Available options: firefox, zen, waterfox")
disable = argparser.add_argument_group("Disable functionality")
disable.add_argument("--no-backup", "-nb", action="store_true", default=False, help="disable backup of current profile (not recommended)"),