Created
December 2, 2022 14:08
-
-
Save simonmicro/8ab3aae53de98e51798425c40f788eee to your computer and use it in GitHub Desktop.
Disable Firefox Pocket on Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import os | |
| script = '''user_pref("extensions.pocket.enabled", false); | |
| user_pref("extensions.pocket.api", "0.0.0.0"); | |
| user_pref("extensions.pocket.loggedOutVariant", ""); | |
| user_pref("extensions.pocket.oAuthConsumerKey", ""); | |
| user_pref("extensions.pocket.onSaveRecs", false); | |
| user_pref("extensions.pocket.onSaveRecs.locales", ""); | |
| user_pref("extensions.pocket.showHome", false); | |
| user_pref("extensions.pocket.site", "0.0.0.0"); | |
| user_pref("browser.newtabpage.activity-stream.pocketCta", ""); | |
| user_pref("browser.newtabpage.activity-stream.section.highlights.includePocket", false); | |
| user_pref("browser.newtabpage.activity-stream.feeds.section.topstories", false); | |
| // Set to false if you use sync | |
| user_pref("services.sync.prefs.sync.browser.newtabpage.activity-stream.section.highlights.includePocket", false); | |
| user_pref("services.sync.prefs.sync-seen.services.sync.prefs.sync.browser.newtabpage.activity-stream.section.highlights.includePocket", false); | |
| user_pref("services.sync.prefs.sync.browser.newtabpage.activity-stream.feeds.section.topstories", false); | |
| ''' | |
| basePath = os.path.expanduser('~/.mozilla/firefox/') | |
| # Create user.js file containing the disable pocket code | |
| with open(os.path.join(basePath, 'disable_pocket_user.js'), 'w') as f: | |
| f.write(script) | |
| print(f'Created disable_pocket_user.js in {basePath}') | |
| for item in os.listdir(basePath): | |
| if 'default-release' in item: | |
| if os.path.exists(os.path.join(basePath, item, 'user.js')): | |
| os.remove(os.path.join(basePath, item, 'user.js')) | |
| os.symlink(os.path.join(basePath, 'disable_pocket_user.js'), os.path.join(basePath, item, 'user.js')) | |
| print(f'Disabled Pocket for profile: {item}') | |
| print('Restart Firefox to apply changes!') |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Based on https://www.reddit.com/r/linux/comments/zabm2a/-/iyllyeg