mirror of
https://github.com/yokoffing/Betterfox.git
synced 2026-06-28 15:41:46 +05:30
Compare commits
3 Commits
aa8ad98105
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| c97bc06396 | |||
| 392c62a03c | |||
| 0bc76714a9 |
@@ -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']
|
|
||||||
@@ -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)!
|
If you like the project, leave a :star: (top right) and become a [stargazer](https://github.com/yokoffing/Betterfox/stargazers)!
|
||||||
|
|
||||||
|
[](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
|
## 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.
|
* 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.
|
* 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
@@ -3,7 +3,7 @@
|
|||||||
* Securefox *
|
* Securefox *
|
||||||
* "Natura non contristatur" *
|
* "Natura non contristatur" *
|
||||||
* priority: provide sensible security and privacy *
|
* priority: provide sensible security and privacy *
|
||||||
* version: 152 *
|
* version: 150 *
|
||||||
* url: https://github.com/yokoffing/Betterfox *
|
* url: https://github.com/yokoffing/Betterfox *
|
||||||
* credit: Most prefs are reproduced and adapted from the arkenfox project *
|
* credit: Most prefs are reproduced and adapted from the arkenfox project *
|
||||||
* credit urL: https://github.com/arkenfox/user.js *
|
* 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]
|
// Opener and redirect heuristics are granted for 30 days, see [3]
|
||||||
// [1] https://blog.mozilla.org/security/2021/07/13/smartblock-v2/
|
// [1] https://blog.mozilla.org/security/2021/07/13/smartblock-v2/
|
||||||
// [2] https://hg.mozilla.org/mozilla-central/rev/e5483fd469ab#l4.12
|
// [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
|
// [3] https://developer.mozilla.org/docs/Web/Privacy/State_Partitioning#storage_access_heuristics
|
||||||
//user_pref("privacy.antitracking.enableWebcompat", false);
|
// 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
|
|
||||||
|
|
||||||
// PREF: set ETP Strict/Custom exception lists (FF141+)
|
// PREF: set ETP Strict/Custom exception lists (FF141+)
|
||||||
// [SETTING] Options>Privacy & Security>Enhanced Tracking Protection>Strict/Custom>Fix major [baseline] | minor [convenience]
|
// [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
|
// [1] https://support.mozilla.org/en-US/kb/manage-enhanced-tracking-protection-exceptions
|
||||||
// [2] https://etp-exceptions.mozilla.org/
|
// [2] https://etp-exceptions.mozilla.org/
|
||||||
//user_pref("privacy.trackingprotection.allow_list.baseline.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]
|
// user_pref("privacy.trackingprotection.allow_list.convenience.enabled", true); // [DEFAULT: true]
|
||||||
|
|
||||||
// PREF: query stripping
|
// PREF: query stripping
|
||||||
// Currently uses a small list [1]
|
// Currently uses a small list [1]
|
||||||
|
|||||||
+9
-7
@@ -99,7 +99,7 @@ def _get_default_profile_folder(firefox_root):
|
|||||||
print(f"Reading {config_path}...")
|
print(f"Reading {config_path}...")
|
||||||
|
|
||||||
config_parser = ConfigParser(strict=False)
|
config_parser = ConfigParser(strict=False)
|
||||||
config_parser.read(config_path)
|
config_parser.read(config_path, encoding = "utf8")
|
||||||
|
|
||||||
path = None
|
path = None
|
||||||
for section in config_parser.sections():
|
for section in config_parser.sections():
|
||||||
@@ -174,12 +174,17 @@ def download_betterfox(url):
|
|||||||
def extract_betterfox(data, profile_folder):
|
def extract_betterfox(data, profile_folder):
|
||||||
zipfile = ZipFile(data)
|
zipfile = ZipFile(data)
|
||||||
userjs_zipinfo = None
|
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:
|
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
|
continue
|
||||||
if file.filename.endswith("user.js"):
|
if file.filename.endswith("user.js"):
|
||||||
userjs_zipinfo = file
|
userjs_zipinfo = file
|
||||||
userjs_zipinfo.filename = Path(userjs_zipinfo.filename).name
|
userjs_zipinfo.filename = Path(userjs_zipinfo.filename).name
|
||||||
|
break
|
||||||
|
|
||||||
if not userjs_zipinfo:
|
if not userjs_zipinfo:
|
||||||
raise BaseException("Could not find user.js!")
|
raise BaseException("Could not find user.js!")
|
||||||
@@ -212,18 +217,15 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
default_profile_folder = _get_default_profile_folder(firefox_root)
|
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("--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 = 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("--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("--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-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("--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 = 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)"),
|
disable.add_argument("--no-backup", "-nb", action="store_true", default=False, help="disable backup of current profile (not recommended)"),
|
||||||
|
|||||||
Reference in New Issue
Block a user