Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Chrome stores extension settings in a JSON file named Preferences in your profile directory (here it is ~/.config/google-chrome/Default/Preferences). The enabled/disabled flag is the "state" key for each extension, with 1 for enabled and 0 for disabled. You could write a script that modified this file before you start Chrome. You could set this script to run on log-in, and even to launch Chrome at the end, if you wanted to auto-start Chrome. Store a list of extensions you want to explicitly disable pre-launch to select only some of them.</p> <p>I would make certain you don't update Preferences while Chrome is running.</p> <p>This works for me, and is likely to work on any *nix-like system. Porting to Windows should be fairly straight-forward: chrome_dir and the check for whether Chrome is running or not may be the only changes required.</p> <pre><code>#!/usr/bin/env python2.6 import datetime import json import os import sys from os import path chrome_dir = path.expanduser("~/.config/google-chrome") if path.lexists(chrome_dir + "/SingletonLock"): # there may be a better and portable way to determine if chrome is running sys.exit("chrome already running") prefs_file = chrome_dir + "/Default/Preferences" now = datetime.datetime.now() prefs_backup_file = prefs_file + now.strftime("-%Y%m%d-%H%M%S") enable_keys = [ # list hash keys, you can find from URL given on chrome://extensions "aeoigbhkilbllfomkmmilbfochhlgdmh", ] disable_keys = [ "hash-like key here", ] default_state = 0 # 1 to enable, 0 to disable, None to leave alone with open(prefs_file) as f: prefs = json.load(f) os.rename(prefs_file, prefs_backup_file) for key, ext in prefs["extensions"]["settings"].iteritems(): if not ext.has_key("state"): # may be blacklisted continue if key in enable_keys: ext["state"] = 1 elif key in disable_keys: ext["state"] = 0 elif default_state is not None: ext["state"] = default_state with open(prefs_file, "w") as f: json.dump(prefs, f) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload